/* === Purchase Flow - Shared modal and cart styles ===
   Used by both gallery (form.html) and Aight merchandise pages.
   Extracted from merchandise.css to centralise purchase UI styles. */

/* === Floating Cart Button === */
.floating-cart {
    position: fixed;
    right: 30px;
    top: 50%;
    transform: translateY(-50%) translateY(-40px);
    z-index: 1001;
    width: 50px;
    height: 50px;
    background: #2a2a2a;
    border: 1px solid #666;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    color: white;
}

.floating-cart:hover {
    background: #FFD700;
    border-color: #FFD700;
    transform: translateY(-50%) translateY(-60px) scale(1.1);
}

.floating-cart svg {
    width: 20px;
    height: 20px;
    fill: white;
    transition: fill 0.3s ease;
}

.floating-cart .cart-count {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #FFD700;
    color: black;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid black;
}

/* === Cart Modal === */
.cart-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    padding: 20px;
    box-sizing: border-box;
}

.cart-modal {
    background: #2a2a2a;
    border-radius: 12px;
    width: 100%;
    max-width: 600px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
    animation: pfModalSlideIn 0.3s ease-out;
}

@keyframes pfModalSlideIn {
    from { opacity: 0; transform: scale(0.9) translateY(-20px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

.cart-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.cart-modal-header h2 {
    color: white;
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
}

.cart-modal-close {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    transition: all 0.3s ease;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cart-modal-close:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: rotate(90deg);
}

.cart-modal-content {
    flex: 1;
    overflow-y: auto;
    padding: 0 25px;
    max-height: 50vh;
}

.cart-loading,
.cart-empty,
.cart-error {
    text-align: center;
    padding: 40px 20px;
    color: #ccc;
    font-size: 1.1rem;
}

.cart-modal-footer {
    padding: 20px 25px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(0, 0, 0, 0.3);
}

.cart-total {
    text-align: center;
    margin-bottom: 15px;
}

.cart-total strong {
    color: white;
    font-size: 1.3rem;
}

.cart-modal-buttons {
    display: flex;
    gap: 12px;
}

.continue-shopping-btn,
.checkout-btn {
    flex: 1;
    padding: 12px 20px;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.continue-shopping-btn {
    background: #6c757d;
    color: white;
}

.continue-shopping-btn:hover {
    background: #545b62;
    transform: translateY(-1px);
}

.checkout-btn {
    background: #28a745;
    color: white;
}

.checkout-btn:hover {
    background: #218838;
    transform: translateY(-1px);
}

/* === Cart Modal Items === */
.cart-modal-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

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

.cart-modal-item img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
    flex-shrink: 0;
    background: #1a1a1a;
}

.cart-item-details {
    flex: 1;
    min-width: 0;
}

.cart-item-details h4 {
    color: white;
    margin: 0 0 5px 0;
    font-size: 1rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cart-item-details .cart-item-size {
    color: #aaa;
    font-size: 0.85rem;
    margin: 0 0 3px 0;
}

.cart-item-details .cart-item-price {
    color: #ccc;
    font-size: 0.9rem;
    margin: 0;
}

.cart-item-controls {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.quantity-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    padding: 4px;
}

.quantity-btn {
    background: #1a1a1a;
    color: white;
    border: none;
    width: 28px;
    height: 28px;
    border-radius: 4px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.quantity-btn:hover {
    background: #333;
}

.quantity-controls .quantity {
    color: white;
    min-width: 24px;
    text-align: center;
    font-weight: 600;
}

.remove-btn {
    background: none;
    border: none;
    color: #ff6b6b;
    font-size: 0.75rem;
    cursor: pointer;
    padding: 4px 8px;
    transition: all 0.2s ease;
}

.remove-btn:hover {
    color: #ff4444;
    text-decoration: underline;
}

.cart-item-subtotal {
    color: white;
    font-weight: 600;
    font-size: 1rem;
    min-width: 70px;
    text-align: right;
}

/* Cart Modal Item Mobile */
@media (max-width: 600px) {
    .cart-modal-item {
        flex-wrap: wrap;
        gap: 10px;
    }

    .cart-modal-item img {
        width: 60px;
        height: 60px;
    }

    .cart-item-details {
        flex: 1;
        min-width: calc(100% - 80px);
    }

    .cart-item-details h4 {
        font-size: 0.9rem;
    }

    .cart-item-controls {
        flex-direction: row;
        width: 100%;
        justify-content: space-between;
    }

    .cart-item-subtotal {
        position: absolute;
        right: 25px;
        top: 15px;
    }

    .cart-modal-item {
        position: relative;
    }
}

@media (max-width: 768px) {
    .floating-cart {
        top: auto !important;
        bottom: 110px !important;
        transform: none !important;
        opacity: 1 !important;
    }

    .floating-cart:hover {
        transform: scale(1.1) !important;
    }
}

/* === Size Modal === */
.size-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.size-modal-overlay.show {
    opacity: 1;
}

.size-modal-content {
    background: #2a2a2a;
    padding: 2rem;
    border-radius: 10px;
    text-align: center;
    max-width: 400px;
    width: 90%;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.size-modal-overlay.show .size-modal-content {
    transform: scale(1);
}

.size-modal-content h3 {
    color: white;
    margin-top: 0;
    margin-bottom: 1.5rem;
}

.size-options {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    justify-content: center;
    margin: 1.5rem 0;
}

.size-btn {
    padding: 10px 16px;
    border: 2px solid #666;
    background: transparent;
    color: white;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s;
    min-width: 60px;
    text-align: center;
    font-size: 14px;
}

.size-btn:hover {
    border-color: #1a1a1a;
    background-color: #1a1a1a;
}

.size-btn.selected {
    border-color: #1a1a1a;
    background-color: #1a1a1a;
}

.size-actions {
    margin-top: 1.5rem;
}

.cancel-btn {
    padding: 10px 20px;
    border: none;
    background: #6c757d;
    color: white;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.cancel-btn:hover {
    background: #5a6268;
}

/* === Colour Selection Modal === */
.color-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.color-modal-overlay.show {
    opacity: 1;
}

.color-modal-content {
    background: #2a2a2a;
    padding: 2rem;
    border-radius: 10px;
    text-align: center;
    max-width: 400px;
    width: 90%;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.color-modal-overlay.show .color-modal-content {
    transform: scale(1);
}

.color-modal-content h3 {
    color: white;
    margin-top: 0;
    margin-bottom: 1.5rem;
}

.color-select-options {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: center;
    margin: 1.5rem 0;
}

.color-select-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 3px solid #444;
    cursor: pointer;
    transition: all 0.3s ease;
}

.color-select-btn:hover {
    transform: scale(1.15);
    border-color: #fff;
    box-shadow: 0 0 10px rgba(255,255,255,0.3);
}

.color-actions {
    margin-top: 1.5rem;
}

/* === Shipping Country Modal === */
.country-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10001;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.country-modal-overlay.show {
    opacity: 1;
}

.country-modal-content {
    background: #2a2a2a;
    padding: 2rem;
    border-radius: 12px;
    text-align: center;
    max-width: 450px;
    width: 90%;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.country-modal-overlay.show .country-modal-content {
    transform: scale(1);
}

.country-modal-content h3 {
    color: white;
    margin-top: 0;
    margin-bottom: 0.5rem;
    font-size: 1.4rem;
}

.country-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 1.5rem;
}

.country-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: #333;
    border: 2px solid #444;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
}

.country-btn:hover {
    background: #3a3a3a;
    border-color: #666;
    transform: translateX(5px);
}

.country-flag {
    font-size: 1.8rem;
}

.country-name {
    flex: 1;
    color: white;
    font-size: 1rem;
    font-weight: 500;
}

.country-shipping {
    color: #4ade80;
    font-weight: 600;
    font-size: 0.95rem;
}

.country-actions {
    margin-top: 1rem;
}

@media (max-width: 480px) {
    .country-modal-content {
        padding: 1.5rem;
    }

    .country-btn {
        padding: 10px 12px;
        gap: 10px;
    }

    .country-flag {
        font-size: 1.5rem;
    }

    .country-name {
        font-size: 0.9rem;
    }
}

/* === Shipping Policy Modal === */
.shipping-policy-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
}

.shipping-policy-content {
    background: #1a1a1a;
    border: 1px solid #333;
    border-radius: 4px;
    max-width: 520px;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
    padding: 32px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.7);
    box-sizing: border-box;
}

.shipping-policy-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: #ffffff;
    text-align: center;
    margin-bottom: 24px;
    text-transform: uppercase;
    letter-spacing: -0.01em;
    border-bottom: 1px solid #333;
    padding-bottom: 16px;
}

.shipping-policy-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
    margin-bottom: 24px;
}

.shipping-policy-item {
    background: #111111;
    padding: 18px;
    border: 1px solid #333;
    border-radius: 3px;
    transition: border-color 0.2s ease;
}

.shipping-policy-item:hover {
    border-color: #555;
}

.shipping-policy-item h4 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.shipping-policy-item p {
    font-size: 0.9rem;
    color: #aaaaaa;
    line-height: 1.6;
    margin: 0;
}

.shipping-policy-item p strong {
    color: #ffffff;
    font-weight: 600;
}

.shipping-policy-notice {
    background: #111111;
    border: 2px solid #8b0000;
    border-radius: 3px;
    padding: 16px;
    text-align: center;
    margin-bottom: 24px;
}

.shipping-policy-notice p {
    font-size: 1rem;
    color: #ffffff;
    margin: 0;
}

.shipping-policy-notice strong {
    color: #ff6b6b;
    font-weight: 700;
}

.shipping-policy-actions {
    text-align: center;
}

.shipping-policy-accept {
    background: #ffffff;
    border: 2px solid #ffffff;
    color: #1a1a1a;
    padding: 12px 24px;
    font-size: 0.9rem;
    font-weight: 700;
    border-radius: 3px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-family: 'Space Grotesk', sans-serif;
}

.shipping-policy-accept:hover {
    background: transparent;
    border-color: #ffffff;
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 255, 255, 0.1);
}

@media (max-width: 768px) {
    .shipping-policy-modal {
        padding: 10px;
        align-items: flex-start;
    }

    .shipping-policy-content {
        margin: 20px auto;
        padding: 24px;
        max-height: 90vh;
    }

    .shipping-policy-title {
        font-size: 1.25rem;
    }

    .shipping-policy-item {
        padding: 14px;
    }

    .shipping-policy-notice {
        padding: 12px;
    }

    .shipping-policy-accept {
        width: 100%;
        padding: 14px 24px;
    }
}

/* === Gallery Buy Buttons (on gallery cards) === */
.gallery-buy-section {
    display: flex;
    gap: 6px;
    padding: 8px 10px 10px;
    justify-content: center;
}

.gallery-card-buy-btn {
    font-family: 'Space Grotesk', sans-serif;
    padding: 8px 16px;
    font-size: 0.75rem;
    font-weight: 700;
    border-radius: 3px;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.2s ease;
    flex: 1;
    text-align: center;
}

.gallery-card-buy-now {
    border: 2px solid #1a1a1a;
    background: #1a1a1a;
    color: #fff;
}

.gallery-card-buy-now:hover {
    background: transparent;
    color: #1a1a1a;
    transform: translateY(-1px);
}

.gallery-card-add-to-cart {
    border: 2px solid #c4651a;
    background: #c4651a;
    color: #fff;
}

.gallery-card-add-to-cart:hover {
    background: #a8560f;
    border-color: #a8560f;
    transform: translateY(-1px);
}
