/* === PRODUCTS GALLERY === */

.products {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
    padding: 20px 0 60px;
    align-items: stretch;
    max-width: 1400px;
    margin: 0 auto;
}

/* Ապրանքի քարտի ոճեր */
.product-card {
    background: #ffffff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    position: relative;
    display: flex;
    flex-direction: column;
    border: 1px solid #F0ECE9;
    /* Ձեր բեժ գույնը */
    height: 100%;
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 25px rgba(40, 167, 69, 0.15);
    border-color: #28a745;
    /* Ձեր կանաչ գույնը */
}

/* Ապրանքի նկարի կոնտեյներ */
.product-image {
    position: relative;
    width: 100%;
    padding-top: 100%;
    /* 1:1 Aspect Ratio */
    overflow: hidden;
    background: #F0ECE9;
    /* Ձեր բեժ գույնը */
}

.product-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.product-card:hover .product-image img {
    transform: scale(1.08);
}

/* Զեղչի badge */
.discount-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    background: #ff3b3b;
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    padding: 5px 12px;
    border-radius: 25px;
    z-index: 2;
    box-shadow: 0 4px 8px rgba(255, 59, 59, 0.3);
}

/* Ապրանքի ինֆորմացիա */
.product-info {
    padding: 20px 18px 18px;
    flex: 1;
    display: flex;
    flex-direction: column;
    background: #ffffff;
}

.product-title {
    font-size: 16px;
    font-weight: 500;
    color: #71706F;
    /* Ձեր մոխրագույնը */
    margin-bottom: 12px;
    line-height: 1.4;
    transition: color 0.3s ease;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 44px;

}

.product-card:hover .product-title {
    color: #28a745;
    /* Ձեր կանաչ գույնը */
}

/* Գների բլոկ */
.price-box {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 10px 0 18px;
    flex-wrap: wrap;
}

.old-price {
    text-decoration: line-through;
    color: #999;
    font-size: 15px;
    font-weight: 400;
}

.new-price {
    color: #28a745;
    /* Ձեր կանաչ գույնը */
    font-weight: 700;
    font-size: 20px;
}

/* Գնել կոճակ */
.buy-btn {
    width: 100%;
    padding: 14px 10px;
    background: #28a745;
    /* Ձեր կանաչ գույնը */
    color: white;
    border: none;
    border-radius: 50px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: auto;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: 2px solid transparent;
}

.buy-btn:hover {
    background: #218838;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(40, 167, 69, 0.4);
}

.buy-btn:active {
    transform: translateY(0);
}

/* Կատեգորիայի կոճակներ - ձեր գույներով */
.cat-btn {
    padding: 10px 25px;
    border: 1px solid #F0ECE9;
    /* Ձեր բեժ գույնը */
    background: white;
    color: #ccc;
    /* Ձեր մոխրագույնը */
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    white-space: normal;
    text-align: center;
    word-wrap: break-word;
}

.cat-btn:hover,
.cat-btn.active {
    background: #F0ECE9;
    /* Ձեր բեժ գույնը */
    /* Ձեր կանաչ գույնը */
    font-weight: 500;
    transform: translateY(-2px);
    border-color: #ccc;
    color: #ccc;
    /* Ձեր կանաչ գույնը */
}

/* h1 - ձեր գույնով */
h1 {
    color: #71706F;
    /* Ձեր մոխրագույնը */
    font-weight: 600;
}



/* Ռետինա էկրանների համար */
@media (max-width: 768px) {
    .products {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
        gap: 20px;
        padding: 15px 0 40px;
    }

    .product-info {
        padding: 15px 12px 12px;
    }

    .product-title {
        font-size: 15px;
        min-height: 42px;
    }

    .new-price {
        font-size: 18px;
    }

    .buy-btn {
        padding: 12px 8px;
        font-size: 14px;
    }
}

@media (max-width: 580px) {
    .products {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 15px;
    }
}

@media (max-width: 480px) {
    .products {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 10px 0 30px;
    }

    .product-card {
        max-width: 100%;
    }

    .product-info {
        padding: 15px 15px 15px;
    }

    .product-title {
        font-size: 16px;
        min-height: auto;
    }

    .price-box {
        margin: 8px 0 15px;
    }

    .new-price {
        font-size: 20px;
    }

    .discount-badge {
        top: 12px;
        left: 12px;
        font-size: 12px;
        padding: 4px 10px;
    }
}

@media (max-width: 360px) {
    .product-title {
        font-size: 15px;
    }

    .new-price {
        font-size: 18px;
    }

    .old-price {
        font-size: 13px;
    }

    .buy-btn {
        padding: 10px 8px;
        font-size: 13px;
    }
}

/* ===================== SPACING FIX ===================== */
.section {
    margin-top: 120px;
    /* Space from fixed header */
    padding-top: 20px;
}

/* Adjust for mobile */
@media (max-width: 992px) {
    .section {
        margin-top: 100px;
    }
}

.discount-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: #ff3b3b;
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 20px;
    z-index: 2;
}

.price-box {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin: 10px 0;
    align-items: center;
}

.old-price {
    text-decoration: line-through;
    color: #999;
    font-size: 14px;
}

.new-price {
    color: #e60023;
    font-weight: 700;
    font-size: 18px;
}




/* Small font for nav items to fit in one line */
.small-nav-text {
    font-size: 0.9rem;
    white-space: nowrap;
}

/* Adjust language selector for small text */
.language-select.small-nav-text {
    font-size: 0.85rem;
    padding: 4px 25px 4px 8px;
    min-width: 100px;
}

.select-flag {
    font-size: 0.8rem;
    right: 8px;
}

/* Make dropdown items also smaller */
.dropdown-item.small-nav-text {
    font-size: 0.9rem;
    padding: 8px 15px;
}

/* Adjust nav item spacing */
.nav-item.mx-lg-1 {
    margin-left: 0.5rem !important;
    margin-right: 0.5rem !important;
}

/* Ensure all nav items stay in one line */
.navbar-nav {
    flex-wrap: nowrap;
    justify-content: center !important;
}


/* Կատեգորիայի կոճակներ */
.categories {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    justify-content: center;
    margin: 20px auto;
    padding: 20px 15px;
    max-width: 600px;
}

.cat-btn {
    padding: 10px 25px;
    border: 1px solid #F0ECE9;
    background: white;
    color: #71706F;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    white-space: normal;
    text-align: center;
    word-wrap: break-word;
}

h1 {
    color: #71706F;
    font-weight: 600;
}

.cat-btn:hover,
.cat-btn.active {
    background: #F0ECE9 !important;
    color: #71706F;
    font-weight: 300;
    transform: translateY(-2px);
}

/* Desktop և tablet-ում flex */
@media (min-width: 769px) {
    .categories {
        display: flex;
        flex-wrap: wrap;
        max-width: 100%;
    }

    .cat-btn {
        white-space: nowrap;
    }
}

/* Popup ոճեր */
.popup {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 2000;
    align-items: center;
    justify-content: center;
}

.popup.active {
    display: flex;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.popup-content {
    background: white;
    padding: 30px;
    border-radius: 15px;
    max-width: 400px;
    width: 90%;
    position: relative;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.close-btn {
    position: absolute;
    top: 10px;
    right: 15px;
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: #666;
    transition: color 0.3s ease;
}

.close-btn:hover {
    color: #28a745;
}

.popup-content h2 {
    color: #28a745;
    margin-bottom: 15px;
}

.popup-content input {
    width: 100%;
    padding: 12px;
    margin: 10px 0;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

.popup-content input:focus {
    outline: none;
    border-color: #28a745;
    box-shadow: 0 0 0 3px rgba(40, 167, 69, 0.1);
}

.submit-order {
    width: 100%;
    padding: 15px;
    background: #28a745;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    margin-top: 15px;
    font-size: 16px;
    font-weight: 600;
    transition: background 0.3s ease;
}

.submit-order:hover {
    background: #218838;
}

/* For very small screens, reduce spacing more */
@media (max-width: 1200px) {
    .small-nav-text {
        font-size: 0.85rem;
    }

    .nav-item.mx-lg-1 {
        margin-left: 0.3rem !important;
        margin-right: 0.3rem !important;
    }
}

/* Mobile view */
@media (max-width: 991px) {
    .small-nav-text {
        font-size: 1rem;
    }

    .nav-item {
        margin: 5px 0 !important;
    }

    .language-selector {
        margin: 15px auto 0;
        justify-content: center;
    }
}

/* Categories responsive - աստիճանական փոքրացում */
@media (max-width: 600px) {
    .categories {
        gap: 8px;
        padding: 15px 10px;
    }

    .cat-btn {
        padding: 8px 20px;
        font-size: 0.9rem;
    }
}

/* Աստիճանական տառաչափի փոքրացում 500px-ից ներքև */
@media (max-width: 500px) {
    .second-inv-text.small {
        font-size: 0.75rem !important;
        line-height: 1.3;
    }

    .second-inv-img {
        max-width: 55px !important;
    }

    .second-inv-item {
        padding: 10px 8px !important;
    }

    .categories {
        gap: 7px;
        padding: 12px 8px;
    }

    .cat-btn {
        padding: 7px 18px;
        font-size: 0.85rem;
    }
}

@media (max-width: 420px) {
    .second-inv-text.small {
        font-size: 0.9rem !important;
        line-height: 1.2;
    }

    .second-inv-img {
        max-width: 50px !important;
    }

    .second-inv-item {
        padding: 8px 6px !important;
    }

    .categories {
        gap: 6px;
        padding: 10px 5px;
    }

    .cat-btn {
        padding: 6px 15px;
        font-size: 0.8rem;
    }
}

@media (max-width: 380px) {
    .second-inv-text.small {
        font-size: 0.75rem !important;
        line-height: 1.2;
    }

    .second-inv-img {
        max-width: 45px !important;
    }

    .second-inv-item {
        padding: 8px 4px !important;
    }

    .categories {
        gap: 5px;
        padding: 8px 5px;
    }

    .cat-btn {
        padding: 6px 12px;
        font-size: 0.75rem;
    }
}

@media (max-width: 340px) {
    .second-inv-text.small {
        font-size: 0.6rem !important;
        line-height: 1.1;
    }

    .second-inv-img {
        max-width: 40px !important;
    }

    .second-inv-item {
        padding: 6px 3px !important;
    }

    .categories {
        gap: 5px;
        padding: 8px 3px;
    }

    .cat-btn {
        padding: 5px 10px;
        font-size: 0.7rem;
        border-width: 1.5px;
    }
}

/* container */
.btn-group {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    width: 100%;
    max-width: 320px;
    /* controls total width */
    margin: 0 auto;
    /* center */
}


/* buttons */
.btn-more {
    flex: 1;
    /* 50% + 50% */
    text-align: center;
    padding: 14px 0;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 500;
    font-size: 15px;
    transition: 0.3s ease;
    cursor: pointer;
    border: 1px solid transparent;
    font-family: inherit;
    display: flex;
    justify-content: center;
    align-items: center;
    box-sizing: border-box;
    appearance: none;
    -webkit-appearance: none;
    line-height: normal;
}

/* style */
.btn {
    background: #F0ECE9;
    color: #71706F;
}

.btn:hover {
    border: 1px solid #ccc;
    background: #fff;
}



.section {
    margin-top: 120px;
    /* Space from fixed header */
    padding-top: 20px;
}

/* Adjust for mobile */
@media (max-width: 992px) {
    .section {
        margin-top: 100px;
    }
}