/* Starkus Gallery - Frontend Styles */

.starkus-gallery-container {
    max-width: 100%;
    margin: 0 auto;
    padding: 20px 0;
}

.gallery-title {
    text-align: center;
    margin-bottom: 10px;
    color: #2c3e50;
    font-size: 24px;
    font-weight: 600;
}

.gallery-description {
    text-align: center;
    margin-bottom: 30px;
    color: #666;
    font-size: 16px;
    line-height: 1.6;
}

/* Cart Widget */
.cart-widget {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    z-index: 1000;
    min-width: 280px;
}

.cart-header {
    padding: 15px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cart-header h4 {
    margin: 0;
    color: #2c3e50;
    font-size: 16px;
}

.cart-toggle {
    background: #007cba;
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    cursor: pointer;
    position: relative;
    transition: all 0.3s ease;
}

.cart-toggle:hover {
    background: #005a87;
    transform: scale(1.05);
}

.cart-count {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #e74c3c;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 12px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cart-content {
    padding: 15px;
    max-height: 400px;
    overflow-y: auto;
}

.cart-items {
    margin-bottom: 15px;
}

.cart-item {
    display: flex;
    align-items: center;
    padding: 10px;
    border: 1px solid #eee;
    border-radius: 4px;
    margin-bottom: 10px;
    background: #f9f9f9;
}

.cart-item img {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 4px;
    margin-right: 10px;
}

.cart-item-info {
    flex: 1;
}

.cart-item-title {
    font-weight: 600;
    color: #2c3e50;
    font-size: 14px;
    margin-bottom: 5px;
}

.cart-item-price {
    color: #27ae60;
    font-weight: bold;
}

.cart-item-remove {
    background: #e74c3c;
    color: white;
    border: none;
    border-radius: 50%;
    width: 25px;
    height: 25px;
    cursor: pointer;
    margin-left: 10px;
}

.cart-total {
    text-align: center;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 4px;
    margin-bottom: 15px;
}

.cart-actions {
    display: flex;
    gap: 10px;
}

.btn-clear-cart {
    flex: 1;
    background: #6c757d;
    color: white;
    border: none;
    padding: 10px;
    border-radius: 4px;
    cursor: pointer;
}

.btn-checkout {
    flex: 2;
    background: #28a745;
    color: white;
    border: none;
    padding: 10px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
}

/* Gallery Grid */
.starkus-gallery-grid {
    display: grid;
    gap: 20px;
    margin-top: 30px;
}

.starkus-gallery-grid[data-layout="grid"] {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}

.starkus-gallery-grid[data-columns="2"] {
    grid-template-columns: repeat(2, 1fr);
}

.starkus-gallery-grid[data-columns="3"] {
    grid-template-columns: repeat(3, 1fr);
}

.starkus-gallery-grid[data-columns="4"] {
    grid-template-columns: repeat(4, 1fr);
}

.starkus-gallery-grid[data-columns="5"] {
    grid-template-columns: repeat(5, 1fr);
}

@media (max-width: 768px) {
    .starkus-gallery-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 15px;
    }
}

@media (max-width: 480px) {
    .starkus-gallery-grid {
        grid-template-columns: 1fr !important;
        gap: 10px;
    }
}

/* Gallery Items */
.gallery-item {
    position: relative;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.image-container {
    position: relative;
    overflow: hidden;
    aspect-ratio: 4/3;
}

.gallery-thumbnail {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.gallery-item:hover .gallery-thumbnail {
    transform: scale(1.05);
}

.image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery-item:hover .image-overlay {
    opacity: 1;
}

.overlay-content {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: center;
}

.overlay-content button {
    background: #007cba;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 12px;
    transition: all 0.3s ease;
    min-width: 120px;
}

.overlay-content button:hover {
    background: #005a87;
    transform: scale(1.05);
}

.btn-add-cart {
    background: #28a745 !important;
}

.btn-add-cart:hover {
    background: #1e7e34 !important;
}

.btn-free-download {
    background: #ffc107 !important;
    color: #212529 !important;
}

.btn-free-download:hover {
    background: #e0a800 !important;
}

.btn-download {
    background: #17a2b8 !important;
}

.btn-download:hover {
    background: #138496 !important;
}

.image-info {
    padding: 15px;
}

.image-info h4 {
    margin: 0 0 8px 0;
    color: #2c3e50;
    font-size: 16px;
    font-weight: 600;
}

.image-info p {
    margin: 0;
    color: #666;
    font-size: 14px;
    line-height: 1.4;
}

/* Lightbox Modal */
.lightbox-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

.lightbox-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.lightbox-close {
    position: absolute;
    top: -40px;
    right: 0;
    color: white;
    font-size: 30px;
    cursor: pointer;
    z-index: 1;
}

.lightbox-image-container {
    position: relative;
    max-width: 100%;
    max-height: 80vh;
}

.lightbox-image-container img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.lightbox-controls {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    padding: 0 20px;
    transform: translateY(-50%);
}

.lightbox-prev,
.lightbox-next {
    background: rgba(0,0,0,0.7);
    color: white;
    border: none;
    padding: 15px 20px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 16px;
    transition: background 0.3s ease;
}

.lightbox-prev:hover,
.lightbox-next:hover {
    background: rgba(0,0,0,0.9);
}

.lightbox-info {
    background: rgba(0,0,0,0.8);
    color: white;
    padding: 15px 20px;
    border-radius: 8px;
    margin-top: 20px;
    text-align: center;
    max-width: 500px;
}

.lightbox-info h4 {
    margin: 0 0 10px 0;
    font-size: 18px;
}

.lightbox-info p {
    margin: 0;
    font-size: 14px;
    opacity: 0.9;
}

/* Checkout Modal */
.checkout-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

.checkout-modal .modal-content {
    background: white;
    border-radius: 8px;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
}

.checkout-modal .modal-header {
    padding: 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.checkout-modal .modal-header h2 {
    margin: 0;
    color: #2c3e50;
}

.checkout-modal .close {
    color: #666;
    font-size: 24px;
    cursor: pointer;
}

.checkout-modal .modal-body {
    padding: 20px;
}

.checkout-step {
    display: none;
}

.checkout-step.active {
    display: block;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #2c3e50;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #007cba;
    box-shadow: 0 0 0 2px rgba(0,124,186,0.2);
}

.order-summary {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    margin: 20px 0;
}

.order-summary h4 {
    margin: 0 0 15px 0;
    color: #2c3e50;
}

.checkout-item {
    display: flex;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #eee;
}

.checkout-item:last-child {
    border-bottom: none;
}

.checkout-item img {
    width: 40px;
    height: 40px;
    object-fit: cover;
    border-radius: 4px;
    margin-right: 10px;
}

.checkout-item-info {
    flex: 1;
}

.checkout-item-title {
    font-weight: 600;
    color: #2c3e50;
    font-size: 14px;
}

.checkout-item-price {
    color: #27ae60;
    font-weight: bold;
}

.checkout-total {
    text-align: center;
    padding: 15px;
    background: white;
    border-radius: 4px;
    margin-top: 15px;
}

.checkout-actions {
    text-align: center;
    margin-top: 20px;
}

.btn-primary {
    background: #007cba;
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    font-size: 16px;
    transition: background 0.3s ease;
}

.btn-primary:hover {
    background: #005a87;
}

.payment-info {
    background: #e7f3ff;
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
}

.bank-details {
    background: white;
    padding: 15px;
    border-radius: 4px;
    margin-top: 15px;
}

.bank-details p {
    margin: 8px 0;
    font-size: 14px;
}

.upload-proof-area {
    text-align: center;
    padding: 20px;
    border: 2px dashed #ddd;
    border-radius: 8px;
    margin: 20px 0;
}

.upload-proof-area input[type="file"] {
    margin-bottom: 15px;
}

.order-confirmation {
    background: #d4edda;
    padding: 15px;
    border-radius: 8px;
    margin-top: 20px;
    text-align: center;
}

/* Loading States */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.spinner {
    border: 2px solid #f3f3f3;
    border-top: 2px solid #007cba;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    animation: spin 1s linear infinite;
    display: inline-block;
    margin-right: 10px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Notifications */
.starkus-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 20px;
    border-radius: 4px;
    color: white;
    font-weight: 600;
    z-index: 10001;
    min-width: 300px;
    animation: slideIn 0.3s ease;
}

.starkus-notification.success {
    background: #28a745;
}

.starkus-notification.error {
    background: #dc3545;
}

.starkus-notification.info {
    background: #17a2b8;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .cart-widget {
        position: relative;
        top: auto;
        right: auto;
        margin-bottom: 20px;
        width: 100%;
    }
    
    .lightbox-content {
        max-width: 95vw;
        max-height: 95vh;
    }
    
    .checkout-modal .modal-content {
        width: 95%;
        margin: 10px;
    }
}
