/* ========== products.css (EXACT original design match - FINAL) ========== */
/* Keep banner / hero styles */
.hero-section-products {
    position: relative;
    width: 100%;
    height: 600px;
    background-size: cover;
    background-position: center;
    overflow: hidden;
    display: flex;
    align-items: center;
}
.hero-fixed-text { z-index:2; padding-left:24px; max-width:55%; }
.hero-title { font-size:60px; font-weight:900; color:#000; text-shadow:0 2px 6px rgba(0,0,0,.25); }
.hero-yellow { color:#fabe23; }
.hero-sub { font-size:25px; font-weight:700; color:#fff; }

/* ===== TOP SECTION (EXACT match to original site) ===== */
.top-section {
    background: #f8f9fa;
    padding: 50px 0 40px 0;
    margin-bottom: 60px;
    border-bottom: 1px solid #e9ecef;
}

.top-controls {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 40px;
}

.left-section {
    flex: 1;
    max-width: 60%;
}

/* DYNAMIC TITLE - EXACT match to original */
.dynamic-title {
    font-size: 48px;
    font-weight: 900;
    color: #000;
    margin: 0 0 35px 0;
    text-transform: uppercase;
    position: relative;
    display: inline-block;
    letter-spacing: -1px;
}

.title-underline {
    position: absolute;
    bottom: -12px;
    left: 0;
    width: 80px;
    height: 6px;
    background: #fabe23;
}

/* CATEGORY TABS - EXACT match to original (COMPACT & NARROW) */
.category-tabs {
    display: flex;
    gap: 10px;
    flex-wrap: nowrap;
    margin-top: 25px;
    overflow: visible;
}

.category-tab {
    background: #fff;
    border: 2px solid #ddd;
    padding: 10px 18px;
    font-size: 14px;
    font-weight: 600;
    color: #666;
    cursor: pointer;
    transition: all 0.25s ease;
    text-decoration: none;
    display: inline-block;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    position: relative;
    white-space: nowrap;
    flex-shrink: 0;
}

.category-tab:hover {
    color: #000;
    border-color: #999;
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.12);
}

.category-tab.active {
    color: #000;
    border-color: #000;
    background: #fff;
    font-weight: 700;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.15);
}

.category-tab.active::before {
    content: '';
    position: absolute;
    bottom: -2px;
    left: -2px;
    right: -2px;
    height: 3px;
    background: #fabe23;
}

/* RIGHT SECTION - EXACT match to original */
.right-section {
    min-width: 340px;
    max-width: 340px;
    flex-shrink: 0;
}

.search-container {
    background: #fabe23;
    padding: 25px 20px;
    position: relative;
    box-shadow: 0 8px 32px rgba(250, 190, 35, 0.25);
    border-radius: 0;
}

.search-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 18px;
}

.search-title {
    color: #000;
    font-weight: 900;
    font-size: 20px;
    letter-spacing: -0.5px;
}

.search-icon {
    width: 28px;
    height: 28px;
    background: #000;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
}

.search-form {
    margin-bottom: 0;
}

.search-input {
    width: 100%;
    border: none;
    border-bottom: 2px solid #000;
    border-radius: 0;
    background: transparent;
    padding: 10px 0;
    font-weight: 600;
    font-size: 15px;
    color: #000;
}

.search-input:focus {
    outline: none;
    border-bottom-color: #000;
    background: transparent;
    box-shadow: none;
}

.search-input::placeholder {
    color: #555;
    font-weight: 500;
}

.recommend-section {
    display: none; /* Hide completely - not needed in design */
}

.recommend-title {
    color: #000;
    font-weight: 800;
    margin-bottom: 15px;
    font-size: 17px;
}

.keyword-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.keyword-tag {
    background: #fff;
    color: #000;
    border: 2px solid #ddd;
    padding: 8px 16px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.25s ease;
    box-shadow: 0 3px 8px rgba(0,0,0,0.1);
}

.keyword-tag:hover {
    background: #000;
    color: #fff;
    text-decoration: none;
    border-color: #000;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.2);
}

/* ===== PRODUCTS GRID (BRILLIANT ORIGINAL SIZE) ===== */
.products-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 35px;
    justify-content: flex-start;
    align-items: stretch;
    width: 100%;
    box-sizing: border-box;
    padding: 0;
    margin: 0;
}

.products-grid > .product-card {
    flex: 0 0 calc((100% - 70px) / 3);
    max-width: calc((100% - 70px) / 3);
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.product-card {
    background: #fff;
    border-radius: 20px;
    border: 8px solid #fff;
    box-shadow: 0 10px 30px rgba(0,0,0,0.06);
    overflow: hidden;
    transition: transform .22s ease, box-shadow .22s ease, background .18s ease;
    height: 520px;
    position: relative;
    display: flex;
    flex-direction: column;
}

.product-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 0;
    background: #fff;
    z-index: 10;
    border-bottom-left-radius: 12px;
    border-bottom-right-radius: 12px;
    pointer-events: none;
}

.product-card .card-body {
    padding: 26px 22px 12px 22px;
    order: 0;
    z-index: 6;
    background: transparent;
}

.product-card .card-body h5 {
    margin: 0 0 10px 0;
    font-weight: 900;
    font-size: 28px;
    color: #111;
    line-height: 1.02;
}

.product-card .card-body p {
    margin: 0;
    font-size: 15px;
    color: #333;
    line-height: 1.45;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-card .card-image {
    order: 1;
    margin-top: auto;
    width: 100%;
    display: block;
    background: transparent;
    position: relative;
}

.product-card .card-image img {
    display: block;
    width: 100%;
    height: 280px;
    object-fit: contain;
    border-radius: 0;
    object-position: bottom;
}

.product-card:hover {
    background: #fabe23;
    transform: translateY(-6px);
    box-shadow: 0 22px 60px rgba(0,0,0,0.14);
    overflow: visible;
}

.product-card:hover .card-body { opacity: 1; pointer-events: auto; }

.footer-overlay {
    position: absolute;
    left: 50%;
    bottom: 16px;
    transform: translateX(-50%);
    width: calc(100% - 36px);
    display: flex;
    justify-content: space-between;
    align-items: center;
    pointer-events: none;
    opacity: 0;
    transition: opacity .18s ease, transform .18s ease;
    z-index: 90;
}

.product-card:hover .footer-overlay {
    opacity: 1;
    pointer-events: auto;
    transform: translateX(-50%) translateY(0);
}

.product-footer {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.detail-btn {
    background: #000;
    color: #fff;
    padding: 10px 18px;
    border-radius: 20px;
    border: none;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 10px 28px rgba(0,0,0,0.12);
    transition: color .14s ease, transform .12s ease, background .12s ease;
    text-decoration: none;
    display: inline-block;
}

.detail-btn:hover {
    background: #fff;
    color: #fabe23;
    transform: translateY(-2px);
}

.degree-toggle { display:flex; gap:10px; align-items:center; }

.degree-toggle .deg-btn {
    background: #000;
    color: #fff;
    border: none;
    padding: 8px 14px;
    border-radius: 18px;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 6px 18px rgba(0,0,0,0.06);
    transition: transform .12s ease, background .12s ease;
}

.degree-toggle .deg-btn.active {
    transform: scale(1.06);
    box-shadow: 0 10px 30px rgba(0,0,0,0.18);
}

.degree-toggle .deg-btn:hover {
    background: #fff;
    color: #fabe23;
}

/* ===== FULL WIDTH LAYOUT ===== */
.container.my-5 > .row > .col-lg-3 {
    display: none;
}
.container.my-5 > .row > .col-lg-9 {
    flex: 0 0 100%;
    max-width: 100%;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 992px) {
    .products-grid > .product-card {
        flex: 0 0 calc((100% - 35px) / 2);
        max-width: calc((100% - 35px) / 2);
    }

    .top-controls {
        flex-direction: column;
        gap: 50px;
    }

    .left-section {
        max-width: 100%;
    }

    .right-section {
        min-width: auto;
        max-width: 100%;
        width: 100%;
    }

    .dynamic-title {
        font-size: 42px;
    }

    .category-tabs {
        flex-wrap: wrap; /* Allow wrapping on tablets */
    }
}

@media (max-width: 600px) {
    .products-grid > .product-card {
        flex: 0 0 100%;
        max-width: 100%;
    }

    .dynamic-title {
        font-size: 32px;
    }

    .top-section {
        padding: 40px 0 30px 0;
    }

    .category-tabs {
        overflow-x: auto;
        flex-wrap: nowrap;
        padding-bottom: 10px;
    }

    /* MOBILE HERO ADJUSTMENT FOR PRODUCTS PAGE ONLY */
    .hero-section-products {
        height: 420px;                  /* a bit shorter for phones */
        align-items: flex-end;          /* text sits near bottom like about page */
        background-position: center;
    }

    .hero-fixed-text {
        max-width: 100%;
        padding: 0 20px 40px 20px;      /* comfortable side + bottom padding */
    }

    .hero-title {
        font-size: 32px;                /* smaller, fits on one or two lines */
        line-height: 1.05;
    }

    .hero-sub {
        font-size: 18px;
        line-height: 1.4;
        max-width: 90%;
    }
}

/* Pagination styling */
.pagination-container {
    display: flex;
    justify-content: center;
    margin-top: 80px;
    margin-bottom: 40px;
}

.pagination {
    list-style: none;
    display: flex;
    gap: 10px;
    padding: 0;
}

.pagination li {
    display: inline-block;
}

.pagination a,
.pagination span {
    display: block;
    padding: 8px 14px;
    border-radius: 8px;
    background: #000;
    color: #fff;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease-in-out;
}

.pagination a:hover {
    background: #fabe23;
    color: #000;
}

.pagination .active span {
    background: #fabe23;
    color: #000;
}

.product-card img { z-index: 1; pointer-events: none; }
.product-card { z-index: 1; }
