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

body {
    margin: 0;
    font-family: Inter, Arial, sans-serif;
    background: #fffdf5;
    color: #2b2b2b;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ===== HEADER ===== */
.home-header {
    background: linear-gradient(120deg, #fff7d6, #ffe082);
    padding: 14px 0;
    box-shadow: 0 4px 20px rgba(247, 181, 0, 0.25);
    position: sticky;
    top: 0;
    z-index: 100;
}

.home-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.brand img {
    height: auto;
    width: 110px;
}

.login-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #3d2b00;
    background: linear-gradient(90deg, #ffd54f, #ffca28);
    padding: 10px 18px;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    border: 1px solid #f5b301;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(197,144,0,0.2);
}

.login-btn:hover {
    background: linear-gradient(90deg, #ffc107, #ffb300);
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(197,144,0,0.3);
}

/* ===== HERO ===== */
.hero {
    margin-top: 24px;
    background: linear-gradient(135deg, #fff9e6 0%, #fff2c6 60%, #ffe57a 100%);
    border-radius: 20px;
    padding: 36px 32px;
    border: 1px solid #f8de82;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    box-shadow: 0 8px 32px rgba(197,144,0,0.1);
}

.hero-content { flex: 1; }

.hero-kicker {
    margin: 0 0 10px;
    color: #a17300;
    font-weight: 700;
    font-size: 13px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 6px;
}

.hero h1 {
    margin: 0 0 12px;
    font-size: 30px;
    line-height: 1.25;
    color: #2b1d00;
}

.hero > .hero-content > p {
    margin: 0;
    color: #6f5a16;
    font-size: 15px;
    line-height: 1.6;
}

.hero-contact {
    margin-top: 20px;
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.hero-contact a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    background: #fff;
    color: #6b4e00;
    border: 1.5px solid #f2cb4d;
    border-radius: 10px;
    padding: 10px 16px;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(197,144,0,0.1);
}

.hero-contact a:hover {
    background: linear-gradient(90deg, #ffd54f, #ffc107);
    border-color: #efb100;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(197,144,0,0.2);
}

.hero-stats {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.hero-stat {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255,255,255,0.7);
    border: 1px solid #f4e7bc;
    border-radius: 12px;
    padding: 12px 18px;
    font-size: 14px;
    font-weight: 600;
    color: #5a3e00;
    min-width: 180px;
}

.hero-stat i {
    color: #c47a00;
    font-size: 18px;
    width: 22px;
    text-align: center;
}

.hero-stat a {
    color: #5a3e00;
    text-decoration: none;
    font-weight: 600;
}

.hero-stat a:hover {
    color: #a17300;
    text-decoration: underline;
}

/* ===== BRAND SLIDER ===== */
.brand-slider-section {
    margin-top: 20px;
    background: #fff;
    border-radius: 16px;
    border: 1px solid #f4e7bc;
    box-shadow: 0 4px 16px rgba(197,144,0,0.08);
    padding: 18px 0;
    overflow: hidden;
}

.brand-slider-track-wrap {
    overflow: hidden;
    position: relative;
    mask-image: linear-gradient(to right, transparent 0%, black 6%, black 94%, transparent 100%);
    -webkit-mask-image: linear-gradient(to right, transparent 0%, black 6%, black 94%, transparent 100%);
}

.brand-slider-track {
    display: flex;
    align-items: center;
    gap: 0;
    width: max-content;
    animation: brandScroll 35s linear infinite;
}

.brand-slider-track:hover {
    animation-play-state: paused;
}

.brand-slide {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 140px;
    height: 60px;
    padding: 8px 16px;
    filter: grayscale(50%);
    opacity: 0.7;
    transition: filter 0.25s, opacity 0.25s;
}

.brand-slide:hover {
    filter: grayscale(0%);
    opacity: 1;
}

.brand-slide img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

@keyframes brandScroll {
    0%   { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* ===== SEARCH PANEL ===== */
.search-panel {
    background: #fff;
    margin-top: 20px;
    padding: 20px;
    border-radius: 16px;
    box-shadow: 0 8px 30px rgba(197,144,0,0.1);
    border: 1px solid #f8e4a2;
}

.search-panel-title {
    font-size: 14px;
    font-weight: 700;
    color: #a17300;
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

#home-search-form {
    display: grid;
    grid-template-columns: repeat(5, minmax(120px, 1fr));
    gap: 10px;
}

#home-search-form input,
#home-search-form select,
#home-search-form button {
    height: 44px;
    border-radius: 10px;
    border: 1.5px solid #e8d9a0;
    padding: 0 12px;
    font-size: 14px;
    background: #fffefb;
    color: #2b2b2b;
    transition: border-color 0.2s;
    outline: none;
}

#home-search-form input:focus {
    border-color: #ffc107;
    box-shadow: 0 0 0 3px rgba(255,193,7,0.15);
}

#home-search-form button {
    background: linear-gradient(90deg, #ffd54f, #ffc107);
    color: #3d2b00;
    cursor: pointer;
    border: 1.5px solid #efb100;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all 0.2s ease;
}

#home-search-form button:hover {
    background: linear-gradient(90deg, #ffc107, #ffb300);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(197,144,0,0.25);
}

/* ===== CATALOG HEADER ===== */
.catalog-header {
    margin-top: 28px;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.catalog-title {
    font-size: 20px;
    font-weight: 700;
    color: #3d2b00;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.catalog-title i { color: #c47a00; }

/* ===== GRID ===== */
.grid {
    margin-top: 16px;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 16px;
}

/* ===== CARD ===== */
.card {
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(214,153,0,0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border: 1px solid #f4e7bc;
    display: flex;
    flex-direction: column;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(201,144,0,0.18);
}

.card-img-wrap {
    overflow: hidden;
    background: #fffbf0;
    height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.card-img-wrap img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.card:hover .card-img-wrap img {
    transform: scale(1.04);
}

.card-body {
    padding: 14px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.card h3 {
    margin: 0 0 8px;
    font-size: 15px;
    line-height: 1.4;
}

.product-name-link {
    color: #2b2b2b;
    text-decoration: none;
    font-weight: 600;
}

.product-name-link:hover {
    color: #a17300;
}

.meta {
    margin: 0 0 5px;
    font-size: 12px;
    color: #7a6540;
    display: flex;
    align-items: center;
    gap: 6px;
}

.meta i {
    color: #c8a84b;
    width: 14px;
    text-align: center;
}

.card-footer {
    margin-top: auto;
    padding-top: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-top: 1px solid #f4e7bc;
}

.price {
    color: #c47a00;
    font-weight: 700;
    font-size: 16px;
}

.detail-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    text-decoration: none;
    color: #fff;
    background: linear-gradient(90deg, #ffd54f, #ffc107);
    border: 1px solid #efb100;
    border-radius: 8px;
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 600;
    color: #3d2b00;
    transition: all 0.2s ease;
}

.detail-link:hover {
    background: linear-gradient(90deg, #ffc107, #ffb300);
    transform: translateX(2px);
}

/* ===== LOADING ===== */
.loading {
    text-align: center;
    padding: 24px;
    color: #a17300;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.loading-spinner-inner {
    width: 20px;
    height: 20px;
    border: 3px solid #f4e7bc;
    border-top-color: #ffc107;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}

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

/* ===== LOAD MORE ===== */
.load-more-wrap {
    margin: 20px 0 36px;
    text-align: center;
}

.load-more-btn {
    height: 46px;
    padding: 0 28px;
    border-radius: 12px;
    border: 1.5px solid #efb100;
    background: linear-gradient(90deg, #ffd54f, #ffc107);
    color: #3b2a00;
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
    box-shadow: 0 4px 14px rgba(197,144,0,0.2);
}

.load-more-btn:hover {
    background: linear-gradient(90deg, #ffc107, #ffb300);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(197,144,0,0.3);
}

.load-more-btn:disabled {
    background: #f4e7bc;
    border-color: #e8d9a0;
    color: #a17300;
    cursor: default;
    transform: none;
    box-shadow: none;
}

/* ===== FOOTER ===== */
.home-footer {
    background: linear-gradient(120deg, #fff7d6, #ffe082);
    border-top: 1px solid #f4e7bc;
    padding: 18px 0;
    text-align: center;
    color: #7a6540;
    font-size: 13px;
}

/* ===== PRODUCT DETAIL ===== */
.detail-wrap {
    margin-top: 28px;
    margin-bottom: 40px;
}

.back-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(90deg, #ffd54f, #ffc107);
    color: #3d2b00;
    border: 1.5px solid #efb100;
    border-radius: 10px;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    margin-bottom: 24px;
    transition: all 0.2s ease;
    box-shadow: 0 2px 10px rgba(197,144,0,0.2);
}

.back-btn:hover {
    background: linear-gradient(90deg, #ffc107, #ffb300);
    transform: translateX(-3px);
    box-shadow: 0 6px 18px rgba(197,144,0,0.3);
}

.detail-card {
    background: #fff;
    border-radius: 20px;
    padding: 28px;
    display: grid;
    grid-template-columns: 380px 1fr;
    gap: 32px;
    box-shadow: 0 8px 32px rgba(214,153,0,0.12);
    border: 1px solid #f4e1a4;
}

.detail-image-wrap {
    border-radius: 14px;
    overflow: hidden;
    background: #fffbf0;
    border: 1px solid #f4e7bc;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 300px;
}

.detail-image-wrap img {
    width: 100%;
    object-fit: contain;
    max-height: 400px;
}

.detail-info-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 20px;
}

.detail-info h1 {
    margin: 0;
    font-size: 26px;
    color: #2b1d00;
    line-height: 1.3;
}

.detail-new-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: linear-gradient(90deg, #ffd54f, #ffc107);
    color: #3d2b00;
    border-radius: 8px;
    padding: 5px 12px;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
    border: 1px solid #efb100;
}

.detail-price-box {
    background: linear-gradient(135deg, #fff9e6, #fff2c6);
    border: 1.5px solid #f2cb4d;
    border-radius: 14px;
    padding: 16px 20px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.detail-price-label {
    font-size: 13px;
    color: #a17300;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.detail-price-value {
    font-size: 28px;
    font-weight: 800;
    color: #c47a00;
}

.detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 20px;
}

.detail-row {
    background: #fffbf0;
    border: 1px solid #f3dfa5;
    border-radius: 12px;
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.detail-row span {
    color: #a17300;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.detail-row strong {
    font-size: 14px;
    color: #2b1d00;
}

.stok-var { color: #2e7d32; }
.stok-yox { color: #c62828; }

.alt-codes {
    background: #fffbec;
    border: 1px solid #f3dfa5;
    border-radius: 14px;
    padding: 16px;
    margin-bottom: 20px;
}

.alt-codes h3 {
    margin: 0 0 10px;
    font-size: 14px;
    color: #a17300;
    display: flex;
    align-items: center;
    gap: 8px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.alt-codes p {
    margin: 0;
    font-size: 14px;
    color: #5a3e00;
    line-height: 1.6;
}

.detail-contact-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(90deg, #25d366, #1ebe5d);
    color: #fff;
    border-radius: 12px;
    padding: 14px 24px;
    font-size: 15px;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.2s ease;
    box-shadow: 0 4px 14px rgba(37,211,102,0.3);
    width: 100%;
    justify-content: center;
}

.detail-contact-btn:hover {
    background: linear-gradient(90deg, #1ebe5d, #17a84f);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(37,211,102,0.4);
}

.detail-contact-btn i { font-size: 20px; }

/* ===== LOGIN/REGISTER BACK LINK ===== */
.back-to-home {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: #a17300;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    margin-bottom: 16px;
    transition: color 0.2s;
}

.back-to-home:hover { color: #3d2b00; }

/* ===== RESPONSIVE ===== */
@media (max-width: 1100px) {
    .grid { grid-template-columns: repeat(4, 1fr); }
}

@media (max-width: 900px) {
    .hero {
        flex-direction: column;
        padding: 24px 20px;
    }

    .hero h1 { font-size: 24px; }

    .hero-stats {
        flex-direction: row;
        flex-wrap: wrap;
        width: 100%;
    }

    .hero-stat { min-width: unset; flex: 1; }

    #home-search-form { grid-template-columns: 1fr 1fr; }

    .grid { grid-template-columns: repeat(3, 1fr); }

    .detail-card { grid-template-columns: 1fr; }

    .detail-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 600px) {
    #home-search-form { grid-template-columns: 1fr; }

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

    .detail-grid { grid-template-columns: 1fr; }

    .detail-price-value { font-size: 22px; }
}

/* ===== STOCK NOTICE BANNER ===== */
.stock-notice {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    background: linear-gradient(135deg, #fff3cd, #ffe69c);
    border-left: 5px solid #f0a500;
    border-radius: 10px;
    padding: 16px 22px;
    margin: 14px 0 20px 0;
    font-size: 1.05rem;
    font-weight: 600;
    color: #7a4f00;
    box-shadow: 0 2px 10px rgba(240,165,0,0.15);
}
.stock-notice i.fas {
    font-size: 1.2rem;
    color: #f0a500;
}
.stock-notice a {
    color: #fff;
    background: #25d366;
    border-radius: 6px;
    padding: 5px 12px;
    text-decoration: none;
    font-size: 0.97rem;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: background 0.2s;
}
.stock-notice a:hover {
    background: #1ebe5d;
}
.stock-notice a:last-child {
    background: #0078d4;
}
.stock-notice a:last-child:hover {
    background: #005fa3;
}
