/**
 * Clodzup Theme Custom Component Styles
 */

/* Header & Navigation Transitions */
header.sticky {
    transition: all 0.3s ease;
}

/* Product Card Interactions */
.clodzup-product-card {
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.3s ease;
}

.clodzup-product-card:hover {
    transform: translateY(-4px);
}

/* Circular Free Delivery SVG Animation */
#progress-circle-svg {
    transition: stroke-dashoffset 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Toast Animation */
#toast {
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
}

#toast.show {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
}

/* Modals Overlay */
.clodzup-modal-backdrop {
    animation: fadeIn 0.2s ease-out forwards;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Sticky Mobile Bottom Bar */
.clodzup-sticky-mobile-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 35;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-top: 1px solid var(--clodzup-border, #e5e7eb);
    padding: 0.75rem 1rem;
    box-shadow: 0 -4px 15px rgba(0, 0, 0, 0.05);
}

/* ==========================================================================
   Single Product Order Box & Variations (Pixel-Perfect Mockup Match)
   ========================================================================== */

/* Swatch Pills */
.clodzup-pill-btn {
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
    cursor: pointer !important;
    user-select: none !important;
    font-size: 0.75rem !important;
    padding: 0.625rem 1.25rem !important;
    border-radius: 0.75rem !important;
    background-color: #ffffff !important;
    border: 1.5px solid #e5e7eb !important;
    color: #374151 !important;
    font-weight: 600 !important;
    outline: none !important;
}

.clodzup-pill-btn:hover {
    border-color: #d1d5db !important;
    background-color: #fafafa !important;
}

.clodzup-pill-btn.active {
    border-color: #C5A059 !important;
    background-color: #FDFBF7 !important;
    color: #1a1a1a !important;
    font-weight: 700 !important;
    box-shadow: 0 1px 3px rgba(197, 160, 89, 0.15) !important;
}

/* Hide WooCommerce native table & selects if rendered by standard templates */
.woocommerce div.product form.cart table.variations {
    border: none !important;
    margin-bottom: 0 !important;
    width: 100% !important;
}

.woocommerce div.product form.cart table.variations td,
.woocommerce div.product form.cart table.variations th {
    border: none !important;
    padding: 0 !important;
    display: block !important;
}

.clodzup-native-select,
.woocommerce div.product form.cart table.variations select {
    display: none !important;
}

/* Action Buttons Container (Side-by-side: Cart Icon Button + Buy Now Direct) */
.clodzup-action-buttons {
    display: flex !important;
    align-items: center !important;
    gap: 0.75rem !important;
    width: 100% !important;
}

.woocommerce div.product form.cart .clodzup-action-buttons .single_add_to_cart_button,
.clodzup-action-buttons button.single_add_to_cart_button,
.clodzup-action-buttons .single_add_to_cart_button {
    background-color: #1C1C1C !important;
    color: #D4AF37 !important;
    border-radius: 0.75rem !important;
    width: 5.5rem !important;
    min-width: 5.5rem !important;
    max-width: 6rem !important;
    height: 3.25rem !important;
    padding: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-shrink: 0 !important;
    border: none !important;
    cursor: pointer !important;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.12) !important;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.woocommerce div.product form.cart .clodzup-action-buttons .single_add_to_cart_button:hover,
.clodzup-action-buttons button.single_add_to_cart_button:hover {
    background-color: #000000 !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 8px 14px -2px rgba(0, 0, 0, 0.2) !important;
}

.clodzup-action-buttons .clodzup-buy-now-btn {
    background-color: #C59B4C !important;
    color: #ffffff !important;
    border-radius: 0.75rem !important;
    font-size: 0.8125rem !important;
    font-weight: 700 !important;
    letter-spacing: 0.05em !important;
    text-transform: uppercase !important;
    padding: 0 1.25rem !important;
    height: 3.25rem !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0.5rem !important;
    flex: 1 1 0% !important;
    width: auto !important;
    min-width: 0 !important;
    border: none !important;
    cursor: pointer !important;
    box-shadow: 0 4px 10px -1px rgba(197, 155, 76, 0.3) !important;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
    white-space: nowrap !important;
}

.clodzup-action-buttons .clodzup-buy-now-btn:hover {
    background-color: #B0883B !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 8px 16px -2px rgba(197, 155, 76, 0.4) !important;
}

@media (max-width: 380px) {
    .clodzup-action-buttons {
        gap: 0.5rem !important;
    }
    .woocommerce div.product form.cart .clodzup-action-buttons .single_add_to_cart_button,
    .clodzup-action-buttons button.single_add_to_cart_button,
    .clodzup-action-buttons .single_add_to_cart_button {
        width: 4.5rem !important;
        min-width: 4.5rem !important;
    }
    .clodzup-action-buttons .clodzup-buy-now-btn {
        font-size: 0.6875rem !important;
        padding: 0 0.5rem !important;
    }
}

/* Price Styling */
.clodzup-single-price del,
.woocommerce-Price-amount del {
    color: #9ca3af !important;
    font-weight: 500 !important;
    font-size: 1.125rem !important;
    text-decoration: line-through !important;
    margin-left: 0.5rem !important;
}

.clodzup-single-price ins,
.woocommerce-Price-amount ins {
    text-decoration: none !important;
    font-weight: 800 !important;
    color: #111827 !important;
}

/* Quantity input chrome removal */
#clodzup-product-qty::-webkit-inner-spin-button,
#clodzup-product-qty::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
#clodzup-product-qty {
    -moz-appearance: textfield;
}

/* ==========================================================================
   Store Catalog & Product Grid (Clear on Mobile & PC)
   ========================================================================== */

/* Reset WooCommerce default legacy floats and widths */
.woocommerce ul.products::before,
.woocommerce ul.products::after,
.woocommerce-page ul.products::before,
.woocommerce-page ul.products::after {
    display: none !important;
}

.woocommerce ul.products,
.woocommerce-page ul.products,
.clodzup-products-grid {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 0.875rem !important;
    margin: 0 0 2.5rem 0 !important;
    padding: 0 !important;
    list-style: none !important;
    width: 100% !important;
    float: none !important;
    clear: both !important;
}

@media (min-width: 640px) {
    .woocommerce ul.products,
    .woocommerce-page ul.products,
    .clodzup-products-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 1.25rem !important;
    }
}

@media (min-width: 768px) {
    .woocommerce ul.products,
    .woocommerce-page ul.products,
    .clodzup-products-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
        gap: 1.5rem !important;
    }
}

@media (min-width: 1024px) {
    .woocommerce ul.products,
    .woocommerce-page ul.products,
    .clodzup-products-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
        gap: 1.75rem !important;
    }
}

.woocommerce ul.products li.product,
.woocommerce-page ul.products li.product,
.woocommerce ul.products .product,
.woocommerce-page ul.products .product,
.clodzup-product-card {
    float: none !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    box-sizing: border-box !important;
    display: flex !important;
    flex-direction: column !important;
}

/* Card Price Display */
.clodzup-card-price .woocommerce-Price-amount {
    font-weight: 800 !important;
    color: #1A1A1A !important;
}

.clodzup-card-price del {
    color: #9ca3af !important;
    font-size: 0.75rem !important;
    font-weight: 400 !important;
    text-decoration: line-through !important;
    margin-right: 0.25rem !important;
}

.clodzup-card-price ins {
    text-decoration: none !important;
    color: #1A1A1A !important;
    font-weight: 800 !important;
}

/* ==========================================================================
   Luxury WooCommerce Notice Styles (Overrides unstyled WC messages)
   ========================================================================== */
.woocommerce-message,
.woocommerce-error,
.woocommerce-info {
    padding: 1rem 1.25rem !important;
    margin: 0 0 1.5rem 0 !important;
    border-radius: 1rem !important;
    font-size: 0.875rem !important;
    font-weight: 500 !important;
    line-height: 1.5 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    flex-wrap: wrap !important;
    gap: 0.75rem !important;
    list-style: none !important;
}

.woocommerce-message {
    background-color: #f0fdf4 !important;
    border: 1px solid #bbf7d0 !important;
    color: #166534 !important;
}

.woocommerce-error {
    background-color: #fef2f2 !important;
    border: 1px solid #fecaca !important;
    color: #991b1b !important;
}

.woocommerce-info {
    background-color: #fdfbf7 !important;
    border: 1px solid #e7d8bc !important;
    color: #854d0e !important;
}

.woocommerce-message a.button,
.woocommerce-info a.button {
    background-color: #1a1a1a !important;
    color: #ffffff !important;
    padding: 0.5rem 1rem !important;
    border-radius: 0.75rem !important;
    font-size: 0.75rem !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.05em !important;
    transition: all 0.2s ease !important;
}

.woocommerce-message a.button:hover,
.woocommerce-info a.button:hover {
    background-color: #C5A059 !important;
    color: #ffffff !important;
}

/* ==========================================================================
   WooCommerce Pagination & Breadcrumb Navigation
   ========================================================================== */
.woocommerce-pagination,
.pagination {
    margin: 2.5rem 0 1rem 0 !important;
    text-align: center !important;
}

.woocommerce-pagination ul,
.pagination .nav-links {
    display: inline-flex !important;
    align-items: center !important;
    gap: 0.375rem !important;
    padding: 0.375rem !important;
    background: #ffffff !important;
    border: 1px solid #e5e7eb !important;
    border-radius: 1rem !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04) !important;
    list-style: none !important;
}

.woocommerce-pagination ul li {
    margin: 0 !important;
    padding: 0 !important;
    display: inline-block !important;
}

.woocommerce-pagination ul li .page-numbers,
.pagination .page-numbers {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-width: 2.5rem !important;
    height: 2.5rem !important;
    padding: 0 0.75rem !important;
    border-radius: 0.75rem !important;
    font-size: 0.8125rem !important;
    font-weight: 600 !important;
    color: #4b5563 !important;
    text-decoration: none !important;
    transition: all 0.2s ease !important;
}

.woocommerce-pagination ul li .page-numbers:hover,
.pagination .page-numbers:hover {
    background-color: #f3f4f6 !important;
    color: #111827 !important;
}

.woocommerce-pagination ul li .page-numbers.current,
.pagination .page-numbers.current {
    background-color: #1a1a1a !important;
    color: #ffffff !important;
    font-weight: 700 !important;
}

/* ==========================================================================
   WooCommerce Table Styles (Orders, Downloads, Addresses)
   ========================================================================== */
.woocommerce-table--order-details,
.woocommerce-orders-table,
.woocommerce-MyAccount-orders {
    width: 100% !important;
    border-collapse: separate !important;
    border-spacing: 0 !important;
    border: 1px solid #e5e7eb !important;
    border-radius: 1rem !important;
    overflow: hidden !important;
    margin-bottom: 2rem !important;
}

.woocommerce-table--order-details th,
.woocommerce-orders-table th,
.woocommerce-MyAccount-orders th {
    background-color: #f9fafb !important;
    padding: 0.875rem 1rem !important;
    font-size: 0.75rem !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.05em !important;
    color: #4b5563 !important;
    border-bottom: 1px solid #e5e7eb !important;
}

.woocommerce-table--order-details td,
.woocommerce-orders-table td,
.woocommerce-MyAccount-orders td {
    padding: 1rem !important;
    font-size: 0.875rem !important;
    color: #374151 !important;
    border-bottom: 1px solid #f3f4f6 !important;
}

.woocommerce-orders-table__cell-order-actions a.button {
    background-color: #1a1a1a !important;
    color: #ffffff !important;
    padding: 0.375rem 0.75rem !important;
    border-radius: 0.5rem !important;
    font-size: 0.75rem !important;
    font-weight: 600 !important;
    transition: all 0.2s ease !important;
}

.woocommerce-orders-table__cell-order-actions a.button:hover {
    background-color: #C5A059 !important;
}

/* ==========================================================================
   Mobile Bottom App Bar Padding & Utilities
   ========================================================================== */
@media (max-width: 767px) {
    body {
        padding-bottom: 4.5rem !important;
    }
}

/* Hide scrollbar for Chrome, Safari and Opera */
.no-scrollbar::-webkit-scrollbar {
    display: none;
}

/* Hide scrollbar for IE, Edge and Firefox */
.no-scrollbar {
    -ms-overflow-style: none;  /* IE and Edge */
    scrollbar-width: none;  /* Firefox */
}

/* ==========================================================================
   WooCommerce Form Inputs & Address Fields
   ========================================================================== */
.woocommerce-address-fields input[type="text"],
.woocommerce-address-fields input[type="email"],
.woocommerce-address-fields input[type="tel"],
.woocommerce-address-fields select,
.woocommerce-form-row input[type="text"],
.woocommerce-form-row input[type="email"],
.woocommerce-form-row input[type="password"],
.woocommerce-form-row input[type="tel"],
.woocommerce-form-row select {
    width: 100% !important;
    padding: 0.875rem 1rem !important;
    border: 1px solid #d1d5db !important;
    border-radius: 0.75rem !important;
    font-size: 0.875rem !important;
    color: #1f2937 !important;
    background-color: #ffffff !important;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05) !important;
    transition: all 0.2s ease !important;
    outline: none !important;
}

.woocommerce-address-fields input:focus,
.woocommerce-address-fields select:focus,
.woocommerce-form-row input:focus,
.woocommerce-form-row select:focus {
    border-color: #C5A059 !important;
    box-shadow: 0 0 0 3px rgba(197, 160, 89, 0.2) !important;
}

.woocommerce-address-fields label,
.woocommerce-form-row label {
    display: block !important;
    font-size: 0.75rem !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.05em !important;
    color: #374151 !important;
    margin-bottom: 0.375rem !important;
}

/* ==========================================================================
   Contrast & Readability on Dark Backgrounds
   ========================================================================== */
.text-white,
.text-white h1,
.text-white h2,
.text-white h3,
.text-white h4,
.bg-clodzup-dark h1,
.bg-clodzup-dark h2,
.bg-clodzup-dark h3,
.bg-stone-900 h1,
.bg-stone-900 h2,
.bg-stone-900 h3 {
    color: #ffffff !important;
}

/* ==========================================================================
   Mobile Form Conversion & iOS Auto-Zoom Prevention (font-size >= 16px)
   ========================================================================== */
@media screen and (max-width: 767px) {
    input[type="text"],
    input[type="tel"],
    input[type="email"],
    input[type="password"],
    input[type="number"],
    select,
    textarea,
    .woocommerce-form-row input,
    .woocommerce-form-row select,
    #clodzup-quick-order-form input,
    #clodzup-quick-order-form select,
    form.checkout input,
    form.checkout select,
    form.checkout textarea {
        font-size: 16px !important;
    }
}