.home-section {
    padding: 2rem 0;
}

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

.home-section h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: #1a1a1a;
    text-align: center;
}

.home-section > .container > p {
    text-align: center;
    font-size: 1.1rem;
    color: #666;
    margin-bottom: 3rem;
}

.products-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.9rem;
    justify-content: center;
    margin-top: 2rem;
    align-items: stretch;
}

.product-card {
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #e6e6e6;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    text-align: left;
    flex: 0 0 calc(25% - 0.9rem);
    max-width: calc(25% - 0.9rem);
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.12);
    border-color: #d2d2d2;
}

.product-image {
    width: 100%;
    height: 220px;
    object-fit: contain;
    display: block;
    background-color: #f8f9fb;
    border-bottom: 1px solid #efefef;
    padding: 14px;
}

.product-body {
    padding: 0.75rem 1rem 1rem;
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
}

.product-meta {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    min-height: 170px;
}

.product-body h3 {
    padding: 0.25rem 0 0.25rem;
    font-size: 1.05rem;
    color: #111;
    line-height: 1.3;
    min-height: 2.6em;
}

.product-body p {
    padding: 0.2rem 0;
    color: #666;
    font-size: 0.92rem;
}

.product-body .price {
    padding: 0.3rem 0 0.5rem;
}

.product-purchase {
    margin-top: auto;
}

.price {
    font-weight: 700;
    font-size: 1.2rem;
    color: #b12704;
    margin: 0.2rem 0 0.35rem;
}

.qty-row {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 0.5rem;
    padding: 0.25rem 0 0.75rem;
}

.qty-btn {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    border: 1px solid #d1d5db;
    background: #f9fafb;
    font-size: 1.1rem;
    cursor: pointer;
}

.qty-input {
    width: 64px;
    text-align: center;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    height: 34px;
}

.actions {
    display: flex;
    gap: 0.5rem;
    justify-content: space-between;
    align-items: center;
    flex-wrap: nowrap;
    padding: 0.25rem 0 0.25rem;
    margin-top: auto;
}

.btn {
    border: none;
    border-radius: 8px;
    padding: 0.45rem 0.6rem;
    font-weight: 600;
    cursor: pointer;
    flex: 1 1 auto;
    font-size: 0.88rem;
    white-space: nowrap;
}

.truncate-text {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.truncate-2 {
    -webkit-line-clamp: 2;
}

.truncate-1 {
    -webkit-line-clamp: 1;
}

.truncate-text.expanded {
    -webkit-line-clamp: unset;
}

.read-toggle {
    background: none;
    border: none;
    color: #007185;
    font-size: 0.85rem;
    padding: 0;
    cursor: pointer;
    align-self: flex-start;
}

@media (max-width: 850px) {
    .product-meta {
        min-height: 150px;
    }
}

.add-to-cart {
    background: #ffd814;
    color: #111;
    border: 1px solid #fcd200;
}

.add-to-cart:hover {
    background: #f7ca00;
    border-color: #f2c200;
}

.buy-now {
    background: #ff9900;
    color: #fff;
}

.buy-now:hover {
    background: #f08c00;
}

.shop-search {
    margin: 0 0 1rem;
}

.shop-search .search-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr auto;
    gap: 0.75rem;
    align-items: end;
}

.shop-search .search-field label {
    display: block;
    font-weight: 600;
    font-size: 0.85rem;
    color: #333;
    margin-bottom: 0.35rem;
}

.shop-search .search-field input,
.shop-search .search-field select {
    width: 100%;
    height: 38px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    padding: 0 0.6rem;
    background: #fff;
}

.shop-search .search-actions {
    display: flex;
    gap: 0.5rem;
}

.shop-search .search-actions .btn {
    height: 38px;
}

@media (max-width: 1000px) {
    .shop-search .search-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 640px) {
    .shop-search .search-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 1100px) {
    .product-card {
        flex: 0 0 calc(33.333% - 1.25rem);
        max-width: calc(33.333% - 1.25rem);
    }
}

@media (max-width: 850px) {
    .product-card {
        flex: 0 0 calc(50% - 1.25rem);
        max-width: calc(50% - 1.25rem);
    }
}

@media (max-width: 520px) {
    .product-card {
        flex: 0 0 100%;
        max-width: 100%;
    }
}

/* Captcha (shared styles) */
.captcha-images {
    display: flex;
    flex-wrap: nowrap;
    justify-content: center;
    align-items: center;
    gap: 0.75rem;
    overflow-x: auto;
}

.captcha-option {
    display: inline-flex;
    align-items: center;
    flex: 0 0 auto;
}

.captcha-option input {
    display: none;
}

#cart-container .card {
    border-radius: 12px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}
