/**
 * Genezing Pharmaceuticals - Products Page Styles
 * Design matching Elementor site theme
 * Using Bootstrap 5 + Custom CSS
 */

/* ========================================
   CSS Variables - Matching Site Design
======================================== */
:root {
    --gz-primary: #f7941d;
    --gz-primary-dark: #e8850a;
    --gz-primary-light: #faa93e;
    --gz-secondary: #2d2a6e;
    --gz-secondary-dark: #1e1c4d;
    --gz-dark: #333333;
    --gz-text: #666666;
    --gz-text-light: #888888;
    --gz-white: #ffffff;
    --gz-light-bg: #f8f9fa;
    --gz-section-bg: #f5f5f5;
    --gz-border: #e5e5e5;
    --gz-success: #28a745;
    --gz-danger: #dc3545;
    --gz-shadow: 0 5px 30px rgba(0, 0, 0, 0.08);
    --gz-shadow-hover: 0 10px 40px rgba(247, 148, 29, 0.15);
    --gz-radius: 10px;
    --gz-radius-lg: 15px;
    --gz-transition: all 0.3s ease;
    --gz-font: 'Poppins', sans-serif;
}

/* ========================================
   Base Styles
======================================== */
.gz-products-page {
    font-family: var(--gz-font);
    color: var(--gz-text);
    line-height: 1.6;
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0;
}

.gz-products-page * {
    box-sizing: border-box;
}

/* ========================================
   Astra Theme Full Width Override
======================================== */
body.page-template-page-products,
body.page-template-page-product-detail {
    overflow-x: hidden;
}

body.page-template-page-products #primary,
body.page-template-page-products .site-main,
body.page-template-page-products .ast-container,
body.page-template-page-products .site-content>.ast-container,
body.page-template-page-product-detail #primary,
body.page-template-page-product-detail .site-main,
body.page-template-page-product-detail .ast-container,
body.page-template-page-product-detail .site-content>.ast-container {
    max-width: 100% !important;
    width: 100% !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    margin: 0 !important;
}

body.page-template-page-products .entry-content,
body.page-template-page-product-detail .entry-content {
    margin: 0 !important;
    padding: 0 !important;
}

body.page-template-page-products .ast-separate-container .ast-article-single,
body.page-template-page-products .ast-separate-container .ast-article-post,
body.page-template-page-product-detail .ast-separate-container .ast-article-single,
body.page-template-page-product-detail .ast-separate-container .ast-article-post {
    padding: 0 !important;
    background: transparent !important;
}

body.page-template-page-products .ast-separate-container #primary,
body.page-template-page-product-detail .ast-separate-container #primary {
    padding: 0 !important;
    margin: 0 !important;
}

body.page-template-page-products #secondary,
body.page-template-page-product-detail #secondary {
    display: none !important;
}

/* Elementor compatibility */
.elementor-page .gz-products-page,
.elementor-page .gz-hero-banner,
.elementor-page .gz-products-section,
.elementor-page .gz-product-detail-section {
    width: 100vw;
    margin-left: calc(-50vw + 50%);
}

/* ========================================
   Hero Banner Section
======================================== */
.gz-hero-banner {
    background: linear-gradient(135deg, var(--gz-secondary) 0%, var(--gz-secondary-dark) 100%);
    padding: 80px 0 70px;
    position: relative;
    overflow: hidden;
}

.gz-hero-banner::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 50%;
    height: 100%;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="80" cy="20" r="40" fill="rgba(247,148,29,0.1)"/><circle cx="60" cy="80" r="30" fill="rgba(247,148,29,0.05)"/></svg>');
    background-size: cover;
}

.gz-hero-banner .container {
    position: relative;
    z-index: 1;
}

.gz-breadcrumb {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.gz-breadcrumb a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 15px;
    transition: var(--gz-transition);
}

.gz-breadcrumb a:hover {
    color: var(--gz-primary);
}

.gz-breadcrumb .separator {
    color: rgba(255, 255, 255, 0.4);
    font-size: 12px;
}

.gz-breadcrumb .current {
    color: var(--gz-primary);
    font-weight: 500;
}

.gz-hero-banner h1 {
    color: var(--gz-white);
    font-size: 42px;
    font-weight: 700;
    margin: 0;
    letter-spacing: -0.5px;
}

.gz-hero-banner .subtitle {
    color: rgba(255, 255, 255, 0.8);
    font-size: 16px;
    margin-top: 10px;
}

/* ========================================
   Products Section
======================================== */
.gz-products-section {
    padding: 60px 0 80px;
    background: var(--gz-white);
}

/* Toolbar/Filters */
.gz-products-toolbar {
    background: var(--gz-white);
    border-radius: var(--gz-radius-lg);
    box-shadow: var(--gz-shadow);
    padding: 25px 30px;
    margin-bottom: 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.gz-products-count {
    font-size: 16px;
    color: var(--gz-text);
    transition: var(--gz-transition);
}

.gz-products-count strong {
    color: var(--gz-primary);
    font-weight: 600;
    display: inline-block;
    transition: transform 0.2s ease;
}

.gz-products-count.is-updating strong {
    transform: scale(1.2);
}

.gz-filters {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.gz-filter-select {
    padding: 12px 45px 12px 18px;
    border: 2px solid var(--gz-border);
    border-radius: 8px;
    font-size: 14px;
    font-family: var(--gz-font);
    color: var(--gz-dark);
    background: var(--gz-white) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23666' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E") right 15px center no-repeat;
    cursor: pointer;
    transition: var(--gz-transition);
    appearance: none;
    -webkit-appearance: none;
    min-width: 180px;
}

.gz-filter-select:hover,
.gz-filter-select:focus {
    border-color: var(--gz-primary);
    outline: none;
}

.gz-search-box {
    position: relative;
}

.gz-search-box input {
    padding: 12px 18px 12px 48px;
    border: 2px solid var(--gz-border);
    border-radius: 8px;
    font-size: 14px;
    font-family: var(--gz-font);
    width: 280px;
    transition: var(--gz-transition);
}

.gz-search-box input:hover,
.gz-search-box input:focus {
    border-color: var(--gz-primary);
    outline: none;
}

.gz-search-box input::placeholder {
    color: var(--gz-text-light);
}

.gz-search-box .search-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gz-text-light);
    font-size: 18px;
    transition: var(--gz-transition);
}

/* Search Loader */
.gz-search-loader {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    border: 2px solid var(--gz-border);
    border-top-color: var(--gz-primary);
    border-radius: 50%;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
    animation: gz-spin 0.8s linear infinite;
}

.gz-search-box.is-loading .gz-search-loader {
    opacity: 1;
    visibility: visible;
}

.gz-search-box.is-loading .search-icon {
    color: var(--gz-primary);
}

.gz-search-box.is-loading input {
    border-color: var(--gz-primary);
    padding-right: 45px;
}

/* ========================================
   Product Card
======================================== */
.gz-product-card {
    background: var(--gz-white);
    border-radius: var(--gz-radius-lg);
    overflow: hidden;
    box-shadow: var(--gz-shadow);
    transition: var(--gz-transition);
    height: 100%;
    display: flex;
    flex-direction: column;
    border: 1px solid transparent;
}

.gz-product-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--gz-shadow-hover);
    border-color: rgba(247, 148, 29, 0.2);
}

.gz-product-image {
    position: relative;
    height: 220px;
    background: linear-gradient(135deg, #f8f9fa 0%, #eef2f7 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.gz-product-image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transition: transform 0.4s ease;
    padding: 15px;
}

.gz-product-card:hover .gz-product-image img {
    transform: scale(1.08);
}

.gz-product-image .no-image {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--gz-text-light);
}

.gz-product-image .no-image i {
    font-size: 50px;
    margin-bottom: 10px;
    opacity: 0.4;
}

.gz-product-image .no-image span {
    font-size: 13px;
}

.gz-product-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    z-index: 2;
}

.gz-product-badge.in-stock {
    background: rgba(40, 167, 69, 0.15);
    color: var(--gz-success);
}

.gz-product-badge.out-of-stock {
    background: rgba(220, 53, 69, 0.15);
    color: var(--gz-danger);
}

.gz-product-content {
    padding: 25px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.gz-product-category {
    display: inline-block;
    font-size: 12px;
    color: var(--gz-primary);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.gz-product-title {
    margin: 0 0 12px;
    font-size: 18px;
    font-weight: 600;
    color: var(--gz-dark);
    line-height: 1.4;
}

.gz-product-title a {
    color: inherit;
    text-decoration: none;
    transition: var(--gz-transition);
}

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

.gz-product-meta {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--gz-border);
    flex-wrap: wrap;
}

.gz-product-brand {
    font-size: 13px;
    color: var(--gz-text);
    display: flex;
    align-items: center;
    gap: 6px;
}

.gz-product-brand i {
    color: var(--gz-primary);
    font-size: 14px;
}

.gz-product-sku {
    font-size: 12px;
    color: var(--gz-text-light);
    background: var(--gz-light-bg);
    padding: 3px 10px;
    border-radius: 4px;
}

.gz-product-footer {
    margin-top: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
}

.gz-product-price {
    font-size: 22px;
    font-weight: 700;
    color: var(--gz-primary);
}

.gz-product-price .currency {
    font-size: 14px;
    font-weight: 500;
}

/* ========================================
   Buttons
======================================== */
.gz-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    font-family: var(--gz-font);
    text-decoration: none;
    cursor: pointer;
    transition: var(--gz-transition);
}

.gz-btn-primary {
    background: var(--gz-primary);
    color: var(--gz-white);
}

.gz-btn-primary:hover {
    background: var(--gz-primary-dark);
    color: var(--gz-white);
    transform: translateY(-2px);
}

.gz-btn-outline {
    background: transparent;
    color: var(--gz-dark);
    border: 2px solid var(--gz-border);
}

.gz-btn-outline:hover {
    background: var(--gz-secondary);
    color: var(--gz-white);
    border-color: var(--gz-secondary);
}

.gz-btn-sm {
    padding: 10px 18px;
    font-size: 13px;
}

.gz-btn-lg {
    padding: 16px 35px;
    font-size: 15px;
}

/* ========================================
   Loading & Error States
======================================== */
.gz-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px 20px;
    text-align: center;
}

.gz-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid var(--gz-border);
    border-top-color: var(--gz-primary);
    border-radius: 50%;
    animation: gz-spin 1s linear infinite;
    margin-bottom: 20px;
}

@keyframes gz-spin {
    to {
        transform: rotate(360deg);
    }
}

.gz-loading p {
    color: var(--gz-text);
    font-size: 16px;
}

.gz-error,
.gz-no-products {
    text-align: center;
    padding: 80px 30px;
    background: var(--gz-white);
    border-radius: var(--gz-radius-lg);
    box-shadow: var(--gz-shadow);
}

.gz-error i,
.gz-no-products i {
    font-size: 70px;
    color: var(--gz-text-light);
    margin-bottom: 25px;
    opacity: 0.5;
}

.gz-error h3,
.gz-no-products h3 {
    color: var(--gz-dark);
    margin: 0 0 10px;
    font-size: 24px;
    font-weight: 600;
}

.gz-error p,
.gz-no-products p {
    color: var(--gz-text);
    margin: 0 0 25px;
    font-size: 15px;
}

/* ========================================
   Product Detail Page
======================================== */
.gz-product-detail-section {
    padding: 50px 0 80px;
    background: var(--gz-section-bg);
}

.gz-product-detail-card {
    background: var(--gz-white);
    border-radius: var(--gz-radius-lg);
    box-shadow: var(--gz-shadow);
    overflow: hidden;
}

.gz-product-gallery {
    padding: 40px;
    background: linear-gradient(135deg, #f8f9fa 0%, #eef2f7 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 450px;
}

.gz-main-image {
    background: var(--gz-white);
    border-radius: var(--gz-radius);
    padding: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 380px;
}

.gz-main-image img {
    max-width: 100%;
    max-height: 350px;
    object-fit: contain;
}

.gz-main-image .no-image-large {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--gz-text-light);
}

.gz-main-image .no-image-large i {
    font-size: 100px;
    margin-bottom: 20px;
    opacity: 0.3;
}

.gz-product-info {
    padding: 50px;
}

.gz-detail-badges {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.gz-category-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 18px;
    background: rgba(247, 148, 29, 0.1);
    color: var(--gz-primary);
    font-size: 12px;
    font-weight: 600;
    border-radius: 25px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.gz-stock-badge {
    padding: 8px 18px;
    border-radius: 25px;
    font-size: 12px;
    font-weight: 600;
}

.gz-stock-badge.in-stock {
    background: rgba(40, 167, 69, 0.1);
    color: var(--gz-success);
}

.gz-stock-badge.out-of-stock {
    background: rgba(220, 53, 69, 0.1);
    color: var(--gz-danger);
}

.gz-product-info h1 {
    font-size: 32px;
    font-weight: 700;
    color: var(--gz-dark);
    margin: 0 0 15px;
    line-height: 1.3;
}

.gz-info-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 16px;
    color: var(--gz-text);
    margin-bottom: 25px;
}

.gz-info-brand i {
    color: var(--gz-primary);
    font-size: 18px;
}

.gz-info-brand strong {
    color: var(--gz-dark);
}

.gz-price-box {
    background: linear-gradient(135deg, rgba(247, 148, 29, 0.08) 0%, rgba(247, 148, 29, 0.15) 100%);
    padding: 25px 30px;
    border-radius: var(--gz-radius);
    margin-bottom: 30px;
    border-left: 4px solid var(--gz-primary);
}

.gz-detail-price {
    font-size: 36px;
    font-weight: 700;
    color: var(--gz-primary);
    margin-bottom: 5px;
}

.gz-detail-price .currency {
    font-size: 22px;
    font-weight: 500;
}

.gz-tax-info {
    font-size: 14px;
    color: var(--gz-text);
}

.gz-details-box {
    margin-bottom: 30px;
}

.gz-details-box h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--gz-dark);
    margin: 0 0 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--gz-border);
}

.gz-details-table {
    display: grid;
    gap: 0;
}

.gz-detail-row {
    display: grid;
    grid-template-columns: 150px 1fr;
    gap: 20px;
    padding: 12px 0;
    border-bottom: 1px solid var(--gz-border);
}

.gz-detail-row:last-child {
    border-bottom: none;
}

.gz-detail-label {
    font-weight: 600;
    color: var(--gz-dark);
    font-size: 14px;
}

.gz-detail-value {
    color: var(--gz-text);
    font-size: 14px;
}

.gz-description-box {
    margin-bottom: 35px;
}

.gz-description-box h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--gz-dark);
    margin: 0 0 15px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--gz-border);
}

.gz-description-box p {
    color: var(--gz-text);
    line-height: 1.8;
    font-size: 15px;
    margin: 0;
}

.gz-action-buttons {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

/* ========================================
   Animations
======================================== */
@keyframes gz-fadeIn {
    from {
        opacity: 0;
        transform: translateY(15px);
    }

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

.gz-product-card {
    animation: gz-fadeIn 0.5s ease forwards;
}

.gz-products-grid .col-lg-4:nth-child(1) .gz-product-card {
    animation-delay: 0.1s;
}

.gz-products-grid .col-lg-4:nth-child(2) .gz-product-card {
    animation-delay: 0.2s;
}

.gz-products-grid .col-lg-4:nth-child(3) .gz-product-card {
    animation-delay: 0.3s;
}

.gz-products-grid .col-lg-4:nth-child(4) .gz-product-card {
    animation-delay: 0.15s;
}

.gz-products-grid .col-lg-4:nth-child(5) .gz-product-card {
    animation-delay: 0.25s;
}

.gz-products-grid .col-lg-4:nth-child(6) .gz-product-card {
    animation-delay: 0.35s;
}

/* ========================================
   Responsive Styles
======================================== */
@media (max-width: 1199px) {
    .gz-product-info {
        padding: 40px;
    }

    .gz-product-info h1 {
        font-size: 28px;
    }
}

@media (max-width: 991px) {
    .gz-hero-banner {
        padding: 60px 0 50px;
    }

    .gz-hero-banner h1 {
        font-size: 32px;
    }

    .gz-product-gallery {
        min-height: 350px;
    }

    .gz-product-info {
        padding: 35px;
    }

    .gz-detail-price {
        font-size: 30px;
    }
}

@media (max-width: 767px) {
    .gz-hero-banner {
        padding: 50px 0 40px;
    }

    .gz-hero-banner h1 {
        font-size: 26px;
    }

    .gz-products-toolbar {
        flex-direction: column;
        align-items: stretch;
        padding: 20px;
    }

    .gz-filters {
        flex-direction: column;
        width: 100%;
    }

    .gz-filter-select,
    .gz-search-box input {
        width: 100%;
    }

    .gz-product-image {
        height: 200px;
    }

    .gz-product-content {
        padding: 20px;
    }

    .gz-product-footer {
        flex-direction: column;
        align-items: flex-start;
    }

    .gz-product-gallery {
        padding: 25px;
        min-height: 280px;
    }

    .gz-main-image {
        min-height: 250px;
        padding: 20px;
    }

    .gz-product-info {
        padding: 30px 25px;
    }

    .gz-product-info h1 {
        font-size: 24px;
    }

    .gz-detail-row {
        grid-template-columns: 1fr;
        gap: 5px;
    }

    .gz-action-buttons {
        flex-direction: column;
    }

    .gz-action-buttons .gz-btn {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 575px) {
    .gz-hero-banner h1 {
        font-size: 22px;
    }

    .gz-products-section {
        padding: 40px 0 60px;
    }

    .gz-price-box {
        padding: 20px;
    }

    .gz-detail-price {
        font-size: 26px;
    }
}