/**
 * Power Animal Gallery - Styles
 */

/* Gallery Container */
.pag-gallery {
    padding: 60px 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.pag-gallery-header {
    text-align: center;
    margin-bottom: 40px;
}

.pag-gallery-title {
    font-size: 2rem;
    font-weight: 700;
    color: #fff;
    /* Changed to white */
    margin-bottom: 15px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    /* Added shadow */
}

.pag-gallery-desc {
    color: #f0f0f0;
    /* Lighter text */
    margin-bottom: 20px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.pag-price-info {
    display: flex;
    justify-content: center;
    gap: 40px;
    flex-wrap: wrap;
    background: rgba(255, 255, 255, 0.95);
    /* Semi-transparent white */
    padding: 25px;
    border-radius: 10px;
    border: 2px solid #10b981;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.pag-price-column {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.pag-price-label {
    font-weight: bold;
    font-size: 1.1rem;
    color: #333;
}

.pag-price-value {
    font-size: 1.5rem;
    font-weight: bold;
    color: #10b981;
}

.pag-price-column small {
    color: #555;
    font-weight: 500;
}

/* Gallery Grid */
.pag-gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
}

/* Gallery Item */
.pag-item {
    background: #fff;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    position: relative;
    border: 3px solid transparent;
}

.pag-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
}

.pag-item.pag-selected {
    border-color: #10b981;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2);
}

.pag-item.pag-item-soldout {
    opacity: 0.6;
}

/* Badge */
.pag-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: bold;
    color: #fff;
    z-index: 2;
}

.pag-badge-stock {
    background: #10b981;
}

.pag-badge-soldout {
    background: #ef4444;
}

/* Item Image */
.pag-item-image {
    width: 100%;
    aspect-ratio: 3/4;
    object-fit: cover;
    cursor: pointer;
    transition: transform 0.3s;
}

.pag-item-image:hover {
    transform: scale(1.02);
}

.pag-item-no-image {
    width: 100%;
    aspect-ratio: 3/4;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f0f0f0;
    color: #999;
}

/* Item Info */
.pag-item-info {
    padding: 15px;
    text-align: center;
}

.pag-item-id {
    display: block;
    font-size: 0.8rem;
    color: #888;
    margin-bottom: 5px;
}

.pag-item-theme {
    font-size: 1.1rem;
    font-weight: bold;
    color: #333;
    margin: 0 0 8px 0;
}

.pag-item-desc {
    font-size: 0.9rem;
    color: #666;
    margin: 0;
    line-height: 1.5;
}

/* Add Button */
.pag-item-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
}

.pag-add-btn {
    display: block;
    width: 100%;
    padding: 12px 8px;
    border: none;
    background: #10b981;
    color: #fff;
    font-size: 0.9rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    text-align: center;
    line-height: 1.3;
}

.pag-add-btn:hover {
    background: #059669;
}

.pag-add-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.pag-add-btn small {
    opacity: 0.8;
}

.pag-btn-digital {
    background: #3b82f6;
    border-right: 1px solid rgba(255, 255, 255, 0.2);
}

.pag-btn-digital:hover {
    background: #2563eb;
}

.pag-btn-print {
    background: #8b5cf6;
}

.pag-btn-print:hover {
    background: #7c3aed;
}

/* Selected states per type */
.pag-selected-digital .pag-btn-digital {
    background: #1d4ed8;
    box-shadow: inset 0 0 0 3px rgba(255, 255, 255, 0.4);
}

.pag-selected-digital .pag-btn-digital::before {
    content: "✓ ";
}

.pag-selected-print .pag-btn-print {
    background: #6d28d9;
    box-shadow: inset 0 0 0 3px rgba(255, 255, 255, 0.4);
}

.pag-selected-print .pag-btn-print::before {
    content: "✓ ";
}

/* Button added state */
.pag-btn-added {
    background: #065f46 !important;
    cursor: default;
}

.pag-btn-added:hover {
    background: #065f46 !important;
}

/* Cart item type label */
.pag-cart-item-type {
    display: inline-block;
    font-size: 0.75rem;
    background: #e0e7ff;
    color: #4338ca;
    padding: 2px 8px;
    border-radius: 10px;
    margin-top: 3px;
}

/* Floating Cart */
.pag-floating-cart {
    position: fixed;
    bottom: -100px;
    left: 50%;
    transform: translateX(-50%);
    background: #1f2937;
    color: #fff;
    padding: 15px 30px;
    border-radius: 50px;
    display: flex;
    align-items: center;
    gap: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    transition: bottom 0.4s ease;
}

.pag-floating-cart.pag-cart-active {
    bottom: 30px;
}

.pag-cart-summary {
    display: flex;
    gap: 15px;
}

.pag-cart-count {
    font-size: 0.9rem;
}

.pag-cart-total {
    font-size: 1.2rem;
    font-weight: bold;
    color: #10b981;
}

.pag-checkout-btn {
    background: #10b981;
    color: #fff;
    border: none;
    padding: 10px 25px;
    border-radius: 25px;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.3s;
}

.pag-checkout-btn:hover {
    background: #059669;
}

/* Order Section */
.pag-order-section {
    max-width: 700px;
    margin: 60px auto;
    padding: 40px;
    background: #f9fafb;
    border-radius: 15px;
}

.pag-order-title {
    text-align: center;
    font-size: 1.8rem;
    margin-bottom: 30px;
    color: #333;
}

.pag-empty-cart {
    text-align: center;
    padding: 40px;
    color: #888;
}

/* Cart Items */
.pag-cart-items {
    margin-bottom: 20px;
}

.pag-cart-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: #fff;
    border-radius: 10px;
    margin-bottom: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.pag-cart-item-img {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    object-fit: cover;
}

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

.pag-cart-item-id {
    display: block;
    font-size: 0.8rem;
    color: #888;
}

.pag-cart-item-theme {
    font-weight: bold;
    color: #333;
}

.pag-cart-item-price {
    font-weight: bold;
    color: #10b981;
}

.pag-cart-item-remove {
    width: 30px;
    height: 30px;
    border: none;
    background: #fee2e2;
    color: #ef4444;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    line-height: 1;
}

.pag-cart-item-remove:hover {
    background: #fecaca;
}

/* Order Summary */
.pag-order-summary {
    background: #fff;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 30px;
}

.pag-summary-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #eee;
}

.pag-summary-row:last-child {
    border-bottom: none;
}

.pag-discount {
    color: #10b981;
}

.pag-total {
    font-size: 1.2rem;
    font-weight: bold;
}

.pag-total span:last-child {
    color: #10b981;
}

/* Order Form */
.pag-form-group {
    margin-bottom: 20px;
}

.pag-form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: #333;
}

.pag-form-label .required {
    color: #ef4444;
}

.pag-form-control {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
}

.pag-form-control:focus {
    outline: none;
    border-color: #10b981;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

.pag-submit-btn {
    display: block;
    width: 100%;
    padding: 18px;
    background: #10b981;
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 1.2rem;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.3s;
}

.pag-submit-btn:hover {
    background: #059669;
}

/* Responsive */
@media (max-width: 768px) {
    .pag-gallery {
        padding: 40px 15px;
    }

    .pag-gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 15px;
    }

    .pag-price-info {
        flex-direction: column;
        gap: 10px;
    }

    .pag-floating-cart {
        width: 90%;
        padding: 12px 20px;
        flex-direction: column;
        gap: 10px;
        border-radius: 15px;
    }

    .pag-order-section {
        margin: 30px 15px;
        padding: 25px;
    }
}

/* Detail Button */
.pag-detail-btn {
    display: block;
    width: 100%;
    padding: 10px;
    margin-bottom: 5px;
    background: #f0f4f8;
    border: none;
    color: #475569;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s;
}

.pag-detail-btn:hover {
    background: #e2e8f0;
    color: #1e293b;
}

/* Modal Overlay */
.pag-modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    z-index: 9999;
    overflow-y: auto;
    padding: 20px;
    box-sizing: border-box;
}

.pag-modal-overlay.active {
    display: flex;
    align-items: flex-start;
    justify-content: center;
}

/* Modal Content */
.pag-modal {
    background: #fff;
    border-radius: 20px;
    max-width: 900px;
    width: 100%;
    margin: 40px auto;
    overflow: hidden;
    position: relative;
    animation: pagModalIn 0.3s ease;
}

@keyframes pagModalIn {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.pag-modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 40px;
    height: 40px;
    border: none;
    background: rgba(0, 0, 0, 0.5);
    color: #fff;
    font-size: 1.5rem;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10;
    transition: background 0.3s;
}

.pag-modal-close:hover {
    background: rgba(0, 0, 0, 0.8);
}

/* Modal Gallery */
.pag-modal-gallery {
    display: flex;
    flex-direction: column;
}

.pag-modal-main-image {
    width: 100%;
    max-height: 500px;
    object-fit: contain;
    background: #f8fafc;
}

.pag-modal-thumbnails {
    display: flex;
    gap: 10px;
    padding: 15px;
    overflow-x: auto;
    background: #f8fafc;
}

.pag-modal-thumb {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
    border: 3px solid transparent;
    opacity: 0.7;
    transition: all 0.2s;
}

.pag-modal-thumb:hover,
.pag-modal-thumb.active {
    opacity: 1;
    border-color: #10b981;
}

/* Modal Info */
.pag-modal-info {
    padding: 25px;
}

.pag-modal-title {
    font-size: 1.5rem;
    margin: 0 0 5px 0;
    color: #1e293b;
}

.pag-modal-item-id {
    color: #64748b;
    font-size: 0.9rem;
    margin-bottom: 15px;
}

.pag-modal-desc {
    color: #475569;
    line-height: 1.7;
    margin-bottom: 20px;
}

/* Modal Buttons */
.pag-modal-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.pag-modal-buttons .pag-add-btn {
    padding: 15px;
    font-size: 1rem;
}

/* Layout Container */
.pag-layout-container {
    display: flex;
    gap: 40px;
    align-items: flex-start;
}

/* Sidebar */
.pag-sidebar {
    width: 250px;
    flex-shrink: 0;
}

.pag-category-list {
    list-style: none;
    padding: 0;
    margin: 0;
    position: sticky;
    top: 20px;
}

.pag-category-list li {
    margin-bottom: 10px;
}

.pag-cat-btn {
    display: block;
    width: 100%;
    text-align: left;
    padding: 12px 20px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    color: #fff;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s;
    backdrop-filter: blur(5px);
}

.pag-cat-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateX(5px);
}

.pag-cat-btn.active {
    background: #10b981;
    border-color: #10b981;
    font-weight: bold;
    box-shadow: 0 5px 15px rgba(16, 185, 129, 0.3);
}

/* Main Content */
.pag-main-content {
    flex: 1;
}

/* Responsive */
@media (max-width: 900px) {
    .pag-layout-container {
        flex-direction: column;
    }

    .pag-sidebar {
        width: 100%;
        overflow-x: auto;
    }

    .pag-category-list {
        display: flex;
        gap: 10px;
        position: static;
        padding-bottom: 10px;
    }

    .pag-cat-btn {
        white-space: nowrap;
        background: rgba(255, 255, 255, 0.8);
        color: #333;
    }

    .pag-cat-btn.active {
        color: #fff;
    }
}

@media (max-width: 768px) {
    .pag-modal {
        margin: 20px auto;
        border-radius: 15px;
    }

    .pag-modal-main-image {
        max-height: 350px;
    }

    .pag-modal-buttons {
        grid-template-columns: 1fr;
    }
}