/* ==========================================
   Green Glow Products Display - Styles
   ========================================== */

.ggn-products-wrapper {
    width: 100%;
    background: #f8f6f3;
    padding: 70px 40px;
    font-family: 'Montserrat', sans-serif;
    position: relative;
}

/* ===== SECTION HEADING ===== */
.ggn-products-heading {
    text-align: center;
    margin-bottom: 40px;
}

.ggn-products-label {
    font-size: 0.8rem;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: #5a7d4f;
    font-weight: 500;
    margin-bottom: 12px;
}

.ggn-products-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 2.8rem;
    font-weight: 300;
    color: #2d3e2b;
    letter-spacing: -0.5px;
    margin: 0;
}

.ggn-products-divider {
    width: 40px;
    height: 2px;
    background: #c9a961;
    margin: 18px auto 0;
}

/* ===== CATEGORY TABS ===== */
.ggn-products-tabs {
    display: flex;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 45px;
}

.ggn-tab {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.78rem;
    font-weight: 500;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    color: #5a7d4f !important;
    background: #fff !important;
    border: 1.5px solid #ddd !important;
    padding: 10px 22px;
    border-radius: 2px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none !important;
    outline: none !important;
    box-shadow: none !important;
}

.ggn-tab:hover {
    border-color: #5a7d4f !important;
    color: #5a7d4f !important;
    background: #f8f6f3 !important;
}

.ggn-tab.active {
    background: #5a7d4f !important;
    color: #fff !important;
    border-color: #5a7d4f !important;
}

.ggn-tab:focus {
    outline: none !important;
    box-shadow: none !important;
}

/* ===== PRODUCTS GRID ===== */
.ggn-products-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 28px;
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    min-height: 400px;
}

/* ===== PRODUCT CARD ===== */
.ggn-product-card {
    background: #fff;
    border-radius: 4px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease, opacity 0.3s ease;
    position: relative;
    opacity: 1;
}

.ggn-product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.1);
}

.ggn-product-card.ggn-hidden {
    display: none;
}

.ggn-product-card.ggn-fade-in {
    animation: ggnFadeIn 0.3s ease;
}

@keyframes ggnFadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Discount Badge */
.ggn-product-badge {
    position: absolute;
    top: 14px;
    left: 14px;
    background: #5a7d4f;
    color: #fff;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    padding: 5px 10px;
    border-radius: 2px;
    z-index: 2;
}

/* Product Image */
.ggn-product-image {
    width: 100%;
    aspect-ratio: 1;
    overflow: hidden;
    background: #f0ede8;
}

.ggn-product-image a {
    display: block;
    width: 100%;
    height: 100%;
}

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

.ggn-product-card:hover .ggn-product-image img {
    transform: scale(1.06);
}

/* Product Info */
.ggn-product-info {
    padding: 18px 16px 20px;
}

/* Star Rating */
.ggn-product-reviews {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 8px;
}

.ggn-stars {
    display: flex;
    gap: 2px;
}

.ggn-star {
    color: #ffa500;
    font-size: 0.75rem;
}

.ggn-star.empty,
.ggn-star.half {
    color: #ddd;
}

.ggn-review-count {
    font-size: 0.7rem;
    color: #666;
    font-weight: 500;
}

/* Product Name */
.ggn-product-name {
    font-size: 0.82rem;
    font-weight: 500;
    color: #2d3e2b;
    line-height: 1.4;
    margin: 0 0 10px;
    min-height: 2.3em;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.ggn-product-name a {
    color: #2d3e2b !important;
    text-decoration: none !important;
    transition: color 0.3s ease;
    border-bottom: none !important;
    box-shadow: none !important;
}

.ggn-product-name a:hover {
    color: #5a7d4f !important;
    text-decoration: none !important;
    border-bottom: none !important;
}

/* Product Price */
.ggn-product-price {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
    font-family: 'Montserrat', sans-serif;
}

.ggn-product-price .price {
    display: flex;
    align-items: center;
    gap: 10px;
}

.ggn-product-price ins,
.ggn-product-price .woocommerce-Price-amount {
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 600;
    color: #2d3e2b;
}

.ggn-product-price del,
.ggn-product-price del .woocommerce-Price-amount {
    font-size: 0.78rem;
    color: #999;
    font-weight: 400;
}

/* Add to Cart Button */
.ggn-add-cart {
    display: block;
    width: 100%;
    padding: 11px 0;
    background: #5a7d4f;
    color: #fff !important;
    border: none;
    border-radius: 2px;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.2s ease;
    text-decoration: none !important;
    text-align: center;
}

.ggn-add-cart:hover {
    background: #4a6d3f;
    transform: translateY(-1px);
}

.ggn-add-cart:disabled {
    background: #999;
    cursor: not-allowed;
    transform: none;
}

.ggn-add-cart.ggn-cart-success {
    background: #4a6d3f !important;
    cursor: default;
}

.ggn-cart-loading {
    font-size: 0.72rem;
}

/* Hide WooCommerce default "View Cart" message */
.ggn-products-wrapper + .woocommerce-message,
.ggn-product-card .woocommerce-message,
.woocommerce-message[role="alert"] {
    display: none !important;
}

/* ===== LOADING OVERLAY ===== */
.ggn-products-loading {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(248, 246, 243, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.ggn-loader {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #5a7d4f;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ===== VIEW ALL BUTTON ===== */
.ggn-view-all-wrap {
    text-align: center;
    margin-top: 50px;
}

.ggn-view-all {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.8rem;
    font-weight: 500;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: #5a7d4f;
    border: 1.5px solid #5a7d4f;
    background: transparent;
    padding: 12px 36px;
    border-radius: 2px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none !important;
    display: inline-block;
}

.ggn-view-all:hover {
    background: #5a7d4f;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(90, 125, 79, 0.25);
}

/* ===== NO PRODUCTS MESSAGE ===== */
.ggn-no-products {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px;
    color: #666;
    font-size: 1rem;
}

/* ===== TABLET ===== */
@media (max-width: 1024px) {
    .ggn-products-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 22px;
    }
}

/* ===== MOBILE ===== */
@media (max-width: 768px) {
    .ggn-products-wrapper {
        padding: 50px 20px;
    }

    .ggn-products-title {
        font-size: 2.2rem;
    }

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

    .ggn-products-tabs {
        gap: 6px;
        margin-bottom: 30px;
    }

    .ggn-tab {
        font-size: 0.7rem;
        padding: 8px 14px;
    }

    .ggn-product-name {
        font-size: 0.75rem;
    }

    .ggn-product-price ins,
    .ggn-product-price .woocommerce-Price-amount {
        font-size: 0.85rem;
    }

    .ggn-product-price del,
    .ggn-product-price del .woocommerce-Price-amount {
        font-size: 0.7rem;
    }

    .ggn-add-cart {
        font-size: 0.65rem;
        padding: 10px 0;
        letter-spacing: 0.8px;
    }

    .ggn-product-badge {
        font-size: 0.62rem;
        padding: 4px 8px;
        top: 10px;
        left: 10px;
    }

    .ggn-review-count {
        font-size: 0.65rem;
    }

    .ggn-star {
        font-size: 0.7rem;
    }
}

/* ===== SMALL MOBILE ===== */
@media (max-width: 420px) {
    .ggn-products-wrapper {
        padding: 40px 14px;
    }

    .ggn-products-title {
        font-size: 1.9rem;
    }

    .ggn-products-grid {
        gap: 10px;
    }

    .ggn-product-info {
        padding: 12px 10px 14px;
    }

    .ggn-product-name {
        font-size: 0.7rem;
        margin-bottom: 8px;
    }

    .ggn-product-price {
        margin-bottom: 10px;
        gap: 6px;
    }

    .ggn-product-price ins,
    .ggn-product-price .woocommerce-Price-amount {
        font-size: 0.78rem;
    }
}

/* ===== FORCE REMOVE UNDERLINES ===== */
.ggn-product-card a,
.ggn-product-card a:link,
.ggn-product-card a:visited,
.ggn-product-card a:hover,
.ggn-product-card a:active,
.ggn-product-image a,
.ggn-product-name a {
    text-decoration: none !important;
    border-bottom: none !important;
    box-shadow: none !important;
    outline: none !important;
}

/* ===== ADDITIONAL WOOCOMMERCE NOTICE HIDING ===== */
.ggn-products-wrapper ~ .woocommerce-notices-wrapper,
.ggn-products-wrapper ~ .woocommerce-message,
body.woocommerce-cart .ggn-products-wrapper ~ .woocommerce-message,
.woocommerce .ggn-products-wrapper + .woocommerce-message {
    display: none !important;
}
