/* ==========================================================================
   Custom Product Pages - Styles
   Font: Inter | Accent: #029DA1
   ========================================================================== */

/* ---------- Banner ---------- */
.cpp-banner {
    width: 100%;
    background: #1FA0D1;
    padding: 48px 20px;
    text-align: center;
}

.cpp-banner-inner {
    max-width: 1280px;
    margin: 0 auto;
}

.cpp-banner-title {
    font-family: 'Inter', sans-serif;
    font-size: 32px;
    font-weight: 700;
    color: #fff;
    margin: 0 0 8px;
    line-height: 1.3;
}

.cpp-banner-subtitle {
    font-family: 'Inter', sans-serif;
    font-size: 16px;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.9);
    margin: 0;
    line-height: 1.5;
}

@media (max-width: 768px) {
    .cpp-banner {
        padding: 32px 16px;
    }

    .cpp-banner-title {
        font-size: 26px;
    }

    .cpp-banner-subtitle {
        font-size: 14px;
    }
}

/* ---------- Cart Page ---------- */
.woocommerce-cart .checkout-button,
.woocommerce-cart a.checkout-button,
.woocommerce-cart .wc-proceed-to-checkout a.checkout-button,
body .woocommerce-cart .wc-proceed-to-checkout a.checkout-button,
body .elementor .wc-proceed-to-checkout a.checkout-button,
body .woocommerce a.button.checkout-button,
body .woocommerce .wc-proceed-to-checkout a {
    background: #029DA1 !important;
    background-color: #029DA1 !important;
    color: #fff !important;
    border: none !important;
    border-radius: 8px !important;
    font-family: 'Inter', sans-serif !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    text-transform: none !important;
    letter-spacing: 0 !important;
    box-shadow: none !important;
    padding: 14px 24px !important;
    text-align: center !important;
    display: block !important;
    transition: background 0.2s !important;
}

.woocommerce-cart .checkout-button:hover,
.woocommerce-cart a.checkout-button:hover,
.woocommerce-cart .wc-proceed-to-checkout a.checkout-button:hover,
body .woocommerce-cart .wc-proceed-to-checkout a.checkout-button:hover,
body .elementor .wc-proceed-to-checkout a.checkout-button:hover,
body .woocommerce a.button.checkout-button:hover,
body .woocommerce .wc-proceed-to-checkout a:hover {
    background: #028285 !important;
    background-color: #028285 !important;
    color: #fff !important;
}

/* Cart product title link */
.woocommerce-cart .woocommerce-cart-form .product-name a,
body .woocommerce-cart .woocommerce-cart-form .product-name a,
body .elementor .woocommerce-cart-form .product-name a,
body .woocommerce td.product-name a,
body .woocommerce-cart td.product-name a {
    color: #029DA1 !important;
    text-decoration: none !important;
    font-family: 'Inter', sans-serif !important;
    font-weight: 600 !important;
}

.woocommerce-cart .woocommerce-cart-form .product-name a:hover,
body .woocommerce-cart .woocommerce-cart-form .product-name a:hover,
body .elementor .woocommerce-cart-form .product-name a:hover,
body .woocommerce td.product-name a:hover,
body .woocommerce-cart td.product-name a:hover {
    color: #028285 !important;
}

/* ---------- Base ---------- */
.cpp-archive-wrapper,
.cpp-single-wrapper {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    max-width: 1280px;
    margin: 0 auto;
    padding: 40px 20px;
    color: #1a1a1a;
    line-height: 1.6;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

/* ==========================================================================
   ARCHIVE / SHOP PAGE
   ========================================================================== */

/* ---------- Header ---------- */
.cpp-archive-header {
    margin-bottom: 32px;
}

.cpp-archive-title {
    font-family: 'Inter', sans-serif;
    font-size: 32px;
    font-weight: 700;
    margin: 0 0 8px;
    color: #1a1a1a;
}

.cpp-archive-description {
    font-size: 15px;
    color: #555;
    max-width: 680px;
}

/* ---------- Layout ---------- */
.cpp-archive-layout {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 40px;
    align-items: start;
}

/* ---------- Sidebar ---------- */
.cpp-sidebar {
    position: sticky;
    top: 40px;
}

.cpp-filter-section {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 24px;
    margin-bottom: 20px;
}

.cpp-filter-heading {
    font-family: 'Inter', sans-serif;
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 16px;
    color: #1a1a1a;
}

/* Price Range Slider */
.cpp-price-slider-track {
    position: relative;
    height: 6px;
    background: #ddd;
    border-radius: 3px;
    margin: 20px 0 24px;
}

.cpp-price-slider-range {
    position: absolute;
    height: 100%;
    background: #029DA1;
    border-radius: 3px;
}

.cpp-price-slider {
    position: absolute;
    width: 100%;
    top: -7px;
    height: 20px;
    -webkit-appearance: none;
    appearance: none;
    background: transparent;
    pointer-events: none;
    margin: 0;
}

.cpp-price-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    background: #029DA1;
    border: 3px solid #fff;
    border-radius: 50%;
    cursor: pointer;
    pointer-events: auto;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}

.cpp-price-slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    background: #029DA1;
    border: 3px solid #fff;
    border-radius: 50%;
    cursor: pointer;
    pointer-events: auto;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}

/* Price Inputs */
.cpp-price-inputs {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
}

.cpp-price-input-group {
    flex: 1;
    position: relative;
}

.cpp-price-input-group label {
    display: block;
    font-size: 12px;
    font-weight: 500;
    color: #777;
    margin-bottom: 4px;
}

.cpp-price-input-group .cpp-currency {
    position: absolute;
    bottom: 9px;
    left: 10px;
    font-size: 13px;
    color: #999;
}

.cpp-price-input-group input {
    width: 100%;
    padding: 8px 8px 8px 24px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
}

.cpp-price-input-group input:focus {
    border-color: #029DA1;
}

.cpp-price-separator {
    margin-top: 18px;
    color: #999;
}

.cpp-filter-btn,
body .cpp-filter-btn,
body .elementor .cpp-filter-btn {
    display: block !important;
    width: 100% !important;
    padding: 10px !important;
    background: #029DA1 !important;
    background-color: #029DA1 !important;
    color: #fff !important;
    border: none !important;
    border-radius: 8px !important;
    font-family: 'Inter', sans-serif !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    transition: background 0.2s !important;
    box-shadow: none !important;
    text-transform: none !important;
    letter-spacing: 0 !important;
}

.cpp-filter-btn:hover,
body .cpp-filter-btn:hover,
body .elementor .cpp-filter-btn:hover {
    background: #028285 !important;
    background-color: #028285 !important;
    color: #fff !important;
}

/* Sort Select */
.cpp-sort-select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    outline: none;
    background: #fff;
    cursor: pointer;
    transition: border-color 0.2s;
}

.cpp-sort-select:focus {
    border-color: #029DA1;
}

/* ---------- Products Area ---------- */
.cpp-results-bar {
    font-size: 14px;
    color: #777;
    margin-bottom: 20px;
}

.cpp-product-grid,
.cpp-related-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

/* Product Card */
.cpp-product-card {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 12px;
    overflow: hidden;
    transition: box-shadow 0.2s, transform 0.2s;
}

.cpp-product-card:hover {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
}

.cpp-product-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.cpp-product-image {
    aspect-ratio: 1;
    overflow: hidden;
    background: #f5f5f5;
}

.cpp-product-image img,
body .cpp-product-image img,
body .elementor .cpp-product-image img {
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important;
    transition: transform 0.3s !important;
}

.cpp-product-card:hover .cpp-product-image img {
    transform: scale(1.05);
}

.cpp-no-image {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    min-height: 200px;
    color: #aaa;
    font-size: 14px;
    background: #f5f5f5;
}

.cpp-product-title {
    font-family: 'Inter', sans-serif;
    font-size: 15px;
    font-weight: 600;
    margin: 16px 16px 4px;
    color: #1a1a1a;
    line-height: 1.3;
}

.cpp-product-price {
    font-size: 15px;
    font-weight: 500;
    color: #029DA1;
    margin: 0 16px 12px;
}

.cpp-product-price del {
    color: #aaa;
    font-weight: 400;
}

.cpp-product-price ins {
    text-decoration: none;
    color: #029DA1;
}

.cpp-product-actions {
    padding: 0 16px 16px;
}

/* Add to Cart Button (Archive) - Override Elementor */
.cpp-add-to-cart,
a.cpp-add-to-cart,
body .cpp-add-to-cart,
body a.cpp-add-to-cart,
body .elementor .cpp-add-to-cart,
.cpp-product-actions .cpp-add-to-cart,
.cpp-product-actions a.cpp-add-to-cart {
    display: block !important;
    width: 100% !important;
    padding: 10px 16px !important;
    background: #029DA1 !important;
    background-color: #029DA1 !important;
    color: #fff !important;
    border: none !important;
    border-radius: 8px !important;
    font-family: 'Inter', sans-serif !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    text-align: center !important;
    text-decoration: none !important;
    cursor: pointer !important;
    transition: background 0.2s !important;
    box-shadow: none !important;
    text-transform: none !important;
    letter-spacing: 0 !important;
    line-height: 1.4 !important;
}

.cpp-add-to-cart:hover,
a.cpp-add-to-cart:hover,
body .cpp-add-to-cart:hover,
body a.cpp-add-to-cart:hover,
body .elementor .cpp-add-to-cart:hover,
.cpp-product-actions .cpp-add-to-cart:hover,
.cpp-product-actions a.cpp-add-to-cart:hover {
    background: #028285 !important;
    background-color: #028285 !important;
    color: #fff !important;
}

.cpp-add-to-cart.added::after {
    content: ' \2713';
}

.cpp-no-products {
    grid-column: 1 / -1;
    text-align: center;
    color: #777;
    padding: 60px 20px;
    font-size: 15px;
}

/* Pagination */
.cpp-pagination {
    margin-top: 40px;
    text-align: center;
}

.cpp-pagination .page-numbers {
    display: inline-block;
    padding: 8px 14px;
    margin: 0 4px;
    border-radius: 6px;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    text-decoration: none;
    color: #555;
    background: #f0f0f0;
    transition: background 0.2s, color 0.2s;
}

.cpp-pagination .page-numbers.current,
.cpp-pagination .page-numbers:hover {
    background: #029DA1;
    color: #fff;
}

/* ==========================================================================
   SINGLE PRODUCT PAGE
   ========================================================================== */

/* ---------- Layout ---------- */
.cpp-single-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: start;
    margin-bottom: 48px;
}

/* ---------- Image ---------- */
.cpp-single-image {
    position: sticky;
    top: 40px;
}

.cpp-single-image-wrap {
    border: 1px solid #ddd;
    border-radius: 12px;
    padding: 20px;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cpp-featured-img {
    max-width: 100%;
    width: auto;
    height: auto;
    display: block;
    border-radius: 8px;
}

.cpp-no-image-large {
    min-height: 400px;
    border-radius: 12px;
}

.cpp-gallery-thumbs {
    display: flex;
    gap: 10px;
    margin-top: 12px;
}

.cpp-thumb {
    width: 72px;
    height: 72px;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    transition: border-color 0.2s;
}

.cpp-thumb.active,
.cpp-thumb:hover {
    border-color: #029DA1;
}

.cpp-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ---------- Product Info ---------- */
.cpp-single-info {
    padding-top: 8px;
}

.cpp-sale-badge {
    display: inline-block;
    background: #029DA1;
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
}

.cpp-single-title {
    font-family: 'Inter', sans-serif;
    font-size: 28px;
    font-weight: 700;
    margin: 0 0 12px;
    color: #1a1a1a;
    line-height: 1.3;
}

.cpp-single-price {
    font-size: 24px;
    font-weight: 600;
    color: #029DA1;
    margin-bottom: 20px;
}

.cpp-single-price del {
    color: #aaa;
    font-weight: 400;
    font-size: 18px;
}

.cpp-single-price ins {
    text-decoration: none;
}

.cpp-product-description {
    font-size: 15px;
    color: #555;
    margin-bottom: 20px;
    line-height: 1.7;
}

.cpp-product-description p:last-child {
    margin-bottom: 0;
}

/* Stock */
.cpp-stock {
    display: inline-block;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 24px;
    padding: 4px 10px;
    border-radius: 4px;
}

.cpp-stock.in-stock {
    color: #0a7a3e;
    background: #e6f9ee;
}

.cpp-stock.out-of-stock {
    color: #c0392b;
    background: #fde8e6;
}

/* Cart Form */
.cpp-single-wrapper .cpp-cart-form {
    margin-bottom: 24px !important;
}

.cpp-single-wrapper .cpp-quantity-row {
    margin-bottom: 16px !important;
}

.cpp-single-wrapper .cpp-quantity-row label {
    display: block !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    margin-bottom: 8px !important;
    color: #333 !important;
    font-family: 'Inter', sans-serif !important;
}

.cpp-single-wrapper .cpp-quantity-control {
    display: inline-flex !important;
    align-items: center !important;
    border: 1px solid #ddd !important;
    border-radius: 8px !important;
    overflow: hidden !important;
    background: #fff !important;
}

.cpp-single-wrapper .cpp-qty-btn {
    width: 40px !important;
    height: 44px !important;
    border: none !important;
    background: #f5f5f5 !important;
    font-size: 18px !important;
    font-weight: 500 !important;
    cursor: pointer !important;
    color: #333 !important;
    transition: background 0.2s !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 !important;
    margin: 0 !important;
    line-height: 1 !important;
    min-height: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
}

.cpp-single-wrapper .cpp-qty-btn:hover {
    background: #e8e8e8 !important;
}

.cpp-single-wrapper .cpp-qty-input,
.cpp-single-wrapper .cpp-qty-input[type="number"] {
    width: 56px !important;
    height: 44px !important;
    border: none !important;
    border-left: 1px solid #ddd !important;
    border-right: 1px solid #ddd !important;
    text-align: center !important;
    font-family: 'Inter', sans-serif !important;
    font-size: 15px !important;
    font-weight: 500 !important;
    outline: none !important;
    -moz-appearance: textfield !important;
    padding: 0 !important;
    margin: 0 !important;
    background: #fff !important;
    color: #333 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    min-height: 0 !important;
}

.cpp-single-wrapper .cpp-qty-input::-webkit-inner-spin-button,
.cpp-single-wrapper .cpp-qty-input::-webkit-outer-spin-button {
    -webkit-appearance: none !important;
    margin: 0 !important;
}

/* Add to Cart Button (Single) - Override Elementor */
.cpp-single-wrapper .cpp-add-to-cart-btn,
.cpp-single-wrapper button.cpp-add-to-cart-btn,
.cpp-single-wrapper .cpp-cart-form .cpp-add-to-cart-btn,
body .cpp-single-wrapper .cpp-add-to-cart-btn,
body .elementor .cpp-add-to-cart-btn,
body .cpp-add-to-cart-btn {
    display: block !important;
    width: 100% !important;
    padding: 14px 24px !important;
    background: #029DA1 !important;
    background-color: #029DA1 !important;
    color: #fff !important;
    border: none !important;
    border-radius: 8px !important;
    font-family: 'Inter', sans-serif !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    transition: background 0.2s !important;
    text-transform: none !important;
    letter-spacing: 0 !important;
    box-shadow: none !important;
    line-height: 1.4 !important;
    text-align: center !important;
}

.cpp-single-wrapper .cpp-add-to-cart-btn:hover,
.cpp-single-wrapper button.cpp-add-to-cart-btn:hover,
body .cpp-single-wrapper .cpp-add-to-cart-btn:hover,
body .elementor .cpp-add-to-cart-btn:hover,
body .cpp-add-to-cart-btn:hover {
    background: #028285 !important;
    background-color: #028285 !important;
    color: #fff !important;
}

/* Meta */
.cpp-meta-item {
    font-size: 14px;
    color: #555;
    margin-bottom: 6px;
}

.cpp-meta-label {
    font-weight: 600;
    color: #333;
}

.cpp-meta-item a {
    color: #029DA1;
    text-decoration: none;
}

.cpp-meta-item a:hover {
    text-decoration: underline;
}

.cpp-section-title {
    font-family: 'Inter', sans-serif;
    font-size: 22px;
    font-weight: 700;
    margin: 0 0 20px;
    color: #1a1a1a;
}

/* ---------- Related Products ---------- */
.cpp-related-section {
    border-top: 1px solid #eee;
    padding-top: 40px;
}

.cpp-related-grid {
    grid-template-columns: repeat(4, 1fr);
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */

@media (max-width: 1024px) {
    .cpp-archive-layout {
        grid-template-columns: 220px 1fr;
        gap: 24px;
    }

    .cpp-product-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .cpp-related-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .cpp-single-layout {
        gap: 32px;
    }
}

@media (max-width: 768px) {
    .cpp-archive-wrapper,
    .cpp-single-wrapper {
        padding: 24px 16px;
    }

    .cpp-archive-title {
        font-size: 26px;
    }

    .cpp-archive-layout {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .cpp-sidebar {
        position: static;
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 16px;
    }

    .cpp-filter-section {
        margin-bottom: 0;
    }

    .cpp-product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }

    .cpp-single-layout {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .cpp-single-image {
        position: static;
    }

    .cpp-single-title {
        font-size: 24px;
    }

    .cpp-related-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }
}

@media (max-width: 480px) {
    .cpp-sidebar {
        grid-template-columns: 1fr;
    }

    .cpp-product-grid {
        grid-template-columns: 1fr;
    }

    .cpp-related-grid {
        grid-template-columns: 1fr 1fr;
    }
}
