/**
 * Enhanced WooCommerce Product Cards & Layouts
 * Glowinkart Theme
 * 
 * Additional styling for product cards, product detail pages, and collection displays
 */

/* ============================================
   PRODUCT CARD STYLES
   ============================================ */

.product-card-wrapper {
    position: relative;
}

.product-card {
    border: none;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
    background-color: #fff;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15) !important;
    border-color: var(--primary-color);
}

/* Product Image Wrapper */
.product-image-wrapper {
    position: relative;
    height: 250px;
    background-color: #f8f9fa;
    overflow: hidden;
    border-radius: 0.5rem 0.5rem 0 0;
}

.product-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

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

/* Sale Flash Badge */
.badge-danger.position-absolute {
    font-size: 0.875rem;
    font-weight: 600;
    padding: 0.5rem 0.75rem;
    border-radius: 0.25rem;
    background-color: #dc3545 !important;
    z-index: 10;
}

/* Product Title */
.product-card .product-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
    min-height: 50px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 10px;
}

.product-card .product-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s ease;
}

.product-card .product-title a:hover {
    color: var(--primary-color);
}

/* Product Rating */
.product-card .product-rating {
    font-size: 0.875rem;
    margin-bottom: 10px;
}

.product-rating i {
    margin-right: 2px;
}

.product-rating span {
    font-size: 0.75rem;
}

/* Product Excerpt */
.product-card .product-excerpt {
    font-size: 0.9rem;
    line-height: 1.4;
    min-height: 40px;
    max-height: 60px;
    overflow: hidden;
    flex-grow: 1;
}

/* Product Card Footer */
.product-card .card-footer {
    padding: 1rem;
    background-color: #f8f9fa;
    border-top: 1px solid #dee2e6;
}

.product-card .card-footer .btn {
    font-weight: 600;
    transition: all 0.3s ease;
    width: 100%;
}

/* Product Price */
.product-price {
    font-size: 1.5rem;
    color: var(--primary-color);
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
}

.product-price del {
    font-size: 1rem;
    color: #999;
    opacity: 0.7;
}

.product-price ins {
    text-decoration: none;
}

/* ============================================
   SHOP PAGE LAYOUT
   ============================================ */

.shop-header {
    background-color: #f8f9fa;
    padding: 1.5rem;
    border-radius: 0.5rem;
    margin-bottom: 2rem;
}

.shop-header .woocommerce-result-count {
    font-size: 0.95rem;
    color: #666;
}

.shop-header select {
    max-width: 250px;
}

/* Products Grid */
.products-grid {
    margin-bottom: 2rem;
}

.products-grid .row {
    margin-bottom: -1rem;
}

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

.single-product-hero {
    background:
        radial-gradient(900px 400px at 10% 20%, rgba(255, 255, 255, 0.12), transparent 60%),
        radial-gradient(800px 350px at 90% 70%, rgba(0, 123, 255, 0.35), transparent 55%),
        linear-gradient(90deg, #061a5c 0%, #0b2b7a 45%, #061a5c 100%);
}

.single-product-title {
    font-size: 2.2rem;
    font-weight: 800;
}

.single-product-subtitle {
    font-size: 0.95rem;
    opacity: 0.85;
}

.single-product-main {
    background: #f4f6ff;
}

.product-images {
    position: relative;
    margin-bottom: 1.75rem;
}

/* Outer gallery card */
.product-images .woocommerce-product-gallery {
    background: #ffffff;
    border-radius: 0.75rem;
    padding: 1.5rem;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.10);
    width: 100%;
    max-width: 760px;
    margin: 0;
    display: block;
}

/* Large main image */
.product-images .woocommerce-product-gallery__wrapper {
    width: 100%;
}

.product-images .woocommerce-product-gallery__image img {
    width: 100%;
    height: 480px;
    object-fit: cover;
    border-radius: 0.75rem;
    display: block;
}

/* Thumbnails row below the main image */
.product-images .flex-control-thumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin: 0.75rem 0 0;
    padding: 0;
    list-style: none;
    max-width: 100%;
}

.product-images .flex-control-thumbs li {
    border-radius: 0.5rem;
    overflow: hidden;
    padding-top: 10px;
}

.product-images .flex-control-thumbs img {
    width: 100%;
    height: 96px;
    object-fit: cover;
    border-radius: 0.5rem;
    opacity: 0.6;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.product-images .flex-control-thumbs img.flex-active,
.product-images .flex-control-thumbs img:hover {
    opacity: 1;
    transform: translateY(-2px);
}

.product-summary {
    background-color: #fff;
    padding-right: 1rem;
}

.product-summary .woocommerce-product-details__short-description {
    font-size: 1rem;
    line-height: 1.6;
    color: #666;
    margin-bottom: 1.5rem;
}

/* Product Title on Detail Page */
.product-summary h1 {
    font-size: 2rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 1rem;
}

/* Rating on Detail Page */
.product-summary .woocommerce-product-rating {
    margin-bottom: 1.5rem;
}

/* Price on Detail Page */
.product-summary p.price {
    font-size: 1.75rem;
    color: var(--primary-color);
    font-weight: 700;
    margin-bottom: 1.5rem;
}

.product-summary p.price span {
    color: var(--primary-color);
}

/* Add to Cart Form */
.product-summary form.cart {
    margin-bottom: 2rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
}

.product-summary form.cart .quantity-selector {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.product-summary form.cart .quantity {
    max-width: 80px;
    margin: 0;
}

.product-summary form.cart input.qty {
    width: 100%;
    padding: 0.5rem;
    text-align: center;
}

.product-summary form.cart button.single_add_to_cart_button {
    min-width: 160px;
    font-size: 1rem;
    font-weight: 600;
    padding: 0.75rem 1.75rem;
}

.product-summary form.cart .glowinkart-buy-now {
    min-width: 160px;
    font-size: 1rem;
    font-weight: 600;
    padding: 0.75rem 1.75rem;
}

/* Designer Button */
.custom-features .designer-button-container {
    text-align: center;
    padding: 1.5rem;
    background-color: #f0f8ff;
    border-radius: 0.5rem;
    margin-bottom: 1.5rem;
}

.designer-button-container .btn {
    font-size: 1.1rem;
    padding: 0.75rem 2rem;
    margin-bottom: 0.5rem;
}

/* Product Meta */
.product-summary .product-meta {
    padding-top: 1.5rem;
}

.product-summary .product-meta p {
    margin-bottom: 0.75rem;
    color: #666;
}

.product-summary .product-meta strong {
    color: #333;
    font-weight: 600;
}

/* ============================================
   PRODUCT FILE UPLOAD (SINGLE PRODUCT)
   ============================================ */

.gk-upload-wrapper {
    width: 100%;
}

.gk-upload-label {
    font-weight: 600;
}

.gk-upload-zone {
    position: relative;
    border-radius: 999px;
    border: 2px dashed rgba(0, 123, 255, 0.35);
    background: #f8f9ff;
    padding: 0.75rem 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.gk-upload-zone-active {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.15);
    background: #eef4ff;
}

.gk-upload-icon {
    width: 36px;
    height: 36px;
    border-radius: 999px;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    font-size: 1.1rem;
}

.gk-upload-text {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.25rem 0.75rem;
    font-size: 0.9rem;
}

.gk-upload-or {
    color: #6c757d;
}

.gk-upload-input {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}

.gk-upload-file-info {
    margin-top: 0.35rem;
}

.gk-upload-file-name {
    font-size: 0.85rem;
    font-weight: 500;
}

/* ============================================
   PRODUCT TABS
   ============================================ */

.woocommerce-tabs {
    margin-top: 3rem;
}

.woocommerce-tabs ul.tabs {
    list-style: none;
    border-bottom: 2px solid #dee2e6;
    display: flex;
    gap: 0;
    flex-wrap: wrap;
}

.woocommerce-tabs ul.tabs li {
    margin: 0;
    padding: 0;
}

.woocommerce-tabs ul.tabs li a {
    display: block;
    padding: 1rem 1.5rem;
    text-decoration: none;
    color: #666;
    font-weight: 500;
    border-bottom: 3px solid transparent;
    transition: all 0.3s ease;
    cursor: pointer;
}

.woocommerce-tabs ul.tabs li.active a {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
    background-color: transparent;
}

.woocommerce-tabs ul.tabs li a:hover {
    color: var(--primary-color);
}

.woocommerce-tabs .woocommerce-Tabs-panel {
    display: none;
    padding: 2rem 0;
}

.woocommerce-tabs .woocommerce-Tabs-panel.active {
    display: block;
}

/* ============================================
   SIDEBAR & FILTERS
   ============================================ */

.shop-sidebar {
    margin-bottom: 2rem;
}

.shop-sidebar .widget {
    background-color: #fff;
    padding: 1.25rem;
    border-radius: 0.85rem;
    margin-bottom: 1.25rem;
    border: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: 0 10px 22px rgba(0, 0, 0, 0.05);
}

.shop-sidebar .widget-title {
    font-size: 1.1rem;
    font-weight: 800;
    color: #111827;
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 0.65rem;
    margin-bottom: 0.9rem;
}

.shop-sidebar .widget-content ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.shop-sidebar .widget-content ul li {
    padding: 0.5rem 0;
    border-bottom: 1px solid #dee2e6;
}

.shop-sidebar .widget-content ul li:last-child {
    border-bottom: none;
}

.shop-sidebar .widget-content ul li a {
    color: #666;
    text-decoration: none;
    transition: all 0.3s ease;
    display: block;
}

.shop-sidebar .widget-content ul li a:hover {
    color: var(--primary-color);
    padding-left: 0.5rem;
}

/* WooCommerce Blocks (Filters sidebar) - theme colors */
.shop-sidebar .wc-block-components-title,
.shop-sidebar .wc-block-components-filter-wrapper__title,
.shop-sidebar .wc-block-components-filter-wrapper h2,
.shop-sidebar .wc-block-components-filter-wrapper h3 {
    font-weight: 800;
    color: #111827;
}

.shop-sidebar .wc-block-active-filters__list {
    list-style: none;
    padding: 0;
    margin: 0 0 12px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.shop-sidebar .wc-block-components-chip,
.shop-sidebar .wc-block-components-chip__button {
    background: rgba(0, 123, 255, 0.10);
    border: 1px solid rgba(0, 123, 255, 0.25);
    color: #111827;
    border-radius: 12px;
    padding: 8px 12px;
    font-weight: 700;
    font-size: 0.9rem;
}

.shop-sidebar .wc-block-components-chip__remove {
    color: var(--primary-color);
}

.shop-sidebar .wc-block-active-filters__clear-all,
.shop-sidebar .wc-block-components-filter-reset-button,
.shop-sidebar .wp-block-button__link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    border-radius: 999px;
    background: var(--primary-color);
    border: 1px solid var(--primary-color);
    color: #fff;
    font-weight: 800;
    padding: 12px 14px;
    text-decoration: none;
}

.shop-sidebar .wc-block-active-filters__clear-all:hover,
.shop-sidebar .wc-block-components-filter-reset-button:hover,
.shop-sidebar .wp-block-button__link:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
    color: #fff;
}

.shop-sidebar .wc-block-components-price-slider__amount input,
.shop-sidebar .price_slider_amount input[type="text"],
.shop-sidebar .price_slider_amount input[type="number"] {
    border: 1px solid rgba(0, 0, 0, 0.18);
    border-radius: 10px;
    padding: 8px 10px;
    font-weight: 700;
    max-width: 110px;
}

/* Range inputs used by WC Blocks price slider */
.shop-sidebar input[type="range"] {
    width: 100%;
    accent-color: var(--primary-color);
}

.shop-sidebar input[type="range"]::-webkit-slider-runnable-track {
    height: 6px;
    background: rgba(0, 123, 255, 0.18);
    border-radius: 999px;
}

.shop-sidebar input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #fff;
    border: 3px solid var(--primary-color);
    margin-top: -5px;
    box-shadow: 0 6px 14px rgba(0, 123, 255, 0.25);
}

.shop-sidebar input[type="range"]::-moz-range-track {
    height: 6px;
    background: rgba(0, 123, 255, 0.18);
    border-radius: 999px;
}

.shop-sidebar input[type="range"]::-moz-range-thumb {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #fff;
    border: 3px solid var(--primary-color);
    box-shadow: 0 6px 14px rgba(0, 123, 255, 0.25);
}

.shop-sidebar input[type="checkbox"],
.shop-sidebar input[type="radio"] {
    accent-color: var(--primary-color);
}

/* ============================================
   RELATED PRODUCTS
   ============================================ */

.related.products,
.upsells.products {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 2px solid #dee2e6;
}

.related h2,
.upsells h2 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 2rem;
}

.related ul.products,
.upsells ul.products {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
}

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

@media (max-width: 992px) {
    .product-images {
        position: static;
        margin-bottom: 2rem;
    }

    .product-summary {
        padding-right: 0;
    }

    .product-card .product-image-wrapper {
        height: 200px;
    }
}

@media (max-width: 768px) {
    .shop-header {
        padding: 1rem;
    }

    .shop-header .row {
        flex-direction: column;
    }

    .shop-header .col-md-6:last-child {
        margin-top: 1rem;
        text-align: left;
    }

    .shop-header .col-md-6:last-child select {
        max-width: 100%;
    }

    .product-card .product-image-wrapper {
        height: 180px;
    }

    .product-card .product-title {
        font-size: 1rem;
    }

    .woocommerce-tabs ul.tabs {
        flex-direction: column;
    }

    .woocommerce-tabs ul.tabs li a {
        padding: 0.75rem 1rem;
        border-bottom: none;
        border-left: 3px solid transparent;
    }

    .woocommerce-tabs ul.tabs li.active a {
        border-left-color: var(--primary-color);
        border-bottom: none;
    }

    .product-summary h1 {
        font-size: 1.5rem;
    }

    .product-summary .quantity-selector {
        flex-direction: column;
        align-items: flex-start !important;
    }
}

@media (max-width: 576px) {
    .products-grid {
        margin-bottom: 1rem;
    }

    .products-grid .row > div {
        margin-bottom: 1rem;
    }

    .product-card {
        margin-bottom: 1rem;
    }

    .product-card .product-image-wrapper {
        height: 150px;
    }

    .product-card .product-title {
        font-size: 0.95rem;
        min-height: 40px;
    }

    .product-card .card-footer {
        padding: 0.75rem;
    }

    .product-card .card-footer .btn {
        font-size: 0.875rem;
        padding: 0.5rem;
    }

    .designer-button-container .btn {
        font-size: 1rem;
    }

    .related ul.products,
    .upsells ul.products {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
}

/* ============================================
   FEATURED COLLECTION LOOK (SHOP PAGE)
   Matches homepage "FEATURED COLLECTION" cards
   ============================================ */

:root {
    --gk-accent: var(--primary-color);
    --gk-accent-2: var(--primary-dark);
}

.bg-light-primary {
    background: rgba(0, 123, 255, 0.12) !important;
}

.shop-layout-section .product-card-featured {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    transition: all 0.4s cubic-bezier(0.23, 1, 0.320, 1);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.shop-layout-section .product-card-featured:hover {
    transform: translateY(-10px);
    box-shadow: 0 30px 60px rgba(0, 123, 255, 0.18);
}

.shop-layout-section .product-card-featured .product-image-wrapper {
    height: 280px;
    background: #f0f3ff;
    display: flex;
    align-items: center;
    justify-content: center;
}

.shop-layout-section .product-card-featured .product-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.shop-layout-section .product-card-featured:hover .product-image-wrapper img {
    transform: scale(1.08);
}

.shop-layout-section .product-card-featured .product-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.35s ease;
}

.shop-layout-section .product-card-featured:hover .product-overlay {
    opacity: 1;
}

.shop-layout-section .product-card-featured .product-overlay .btn {
    transform: scale(0.9);
    transition: transform 0.25s ease;
    border-radius: 999px;
    padding: 10px 16px;
    font-weight: 800;
}

.shop-layout-section .product-card-featured:hover .product-overlay .btn {
    transform: scale(1);
}

.shop-layout-section .product-card-featured .product-rating {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.shop-layout-section .product-card-featured .product-footer {
    padding-top: 1rem;
    border-top: 1px solid rgba(15, 23, 42, 0.10);
}

.shop-layout-section .product-card-featured .product-info {
    display: flex;
    flex-direction: column;
}

.shop-layout-section .product-card-featured .product-title {
    min-height: 54px;
}

.shop-layout-section .product-card-featured .product-price-prefix {
    letter-spacing: 0.08em;
    font-weight: 700;
}

.shop-layout-section .product-card-featured .gk-view-details-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px !important;
    padding: 0.5rem 0.95rem !important;
    font-size: 0.92rem;
    font-weight: 700;
}

/* Blue cart icon box (instead of full-width button) */
.shop-layout-section .product-card-featured a.add_to_cart_button,
.shop-layout-section .product-card-featured a.button {
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 !important;
    border-radius: 8px !important;
    background: var(--gk-accent) !important;
    border: 1px solid var(--gk-accent) !important;
    color: #fff !important;
    box-shadow: 0 10px 18px rgba(0, 123, 255, 0.25);
}

.shop-layout-section .product-card-featured a.add_to_cart_button:hover,
.shop-layout-section .product-card-featured a.button:hover {
    background: var(--gk-accent-2) !important;
    border-color: var(--gk-accent-2) !important;
    transform: translateY(-2px);
}

.shop-layout-section .product-card-featured a.add_to_cart_button i,
.shop-layout-section .product-card-featured a.button i {
    font-size: 14px;
    line-height: 1;
}

.shop-layout-section .product-card-featured a.add_to_cart_button.added {
    background: #16a34a !important;
    border-color: #16a34a !important;
}

/* Featured products (Customer Favorites) CTA buttons */
.featured-products-section .gk-featured-add-to-cart {
    border-radius: 999px;
    padding: 0.55rem 0.9rem;
    font-weight: 600;
    font-size: 0.9rem;
    flex: 1 1 auto;
}

.featured-products-section .gk-featured-view-details {
    border-radius: 999px;
    padding: 0.55rem 0.9rem;
    font-weight: 600;
    font-size: 0.9rem;
    white-space: nowrap;
}

.featured-products-section .product-price-prefix {
    letter-spacing: 0.08em;
}
