:root {
    --bg-color: #f5f5f5;
    --text-color: #333333;
    --muted-color: #777777;
    --accent-color: #e67e22;
    --font-family: 'Inter', 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

body {
    margin: 0;
    padding: 0;
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-family);
    -webkit-font-smoothing: antialiased;
}

/* Header */
.v3-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 40px;
    background-color: var(--accent-color);
    border-bottom: 1px solid #d35400;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.v3-header-left, .v3-header-right {
    display: flex;
    gap: 20px;
    align-items: center;
}

.v3-header a {
    color: #ffffff;
    text-decoration: none;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: color 0.3s;
}

.v3-header a:hover {
    color: #fde3cf;
}

.v3-logo {
    font-size: 24px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 2px;
    text-decoration: none;
    color: #ffffff;
    text-align: center;
}

.v3-logo span {
    display: block;
    font-size: 10px;
    font-weight: 400;
    letter-spacing: 1px;
    color: #fde3cf;
}

/* Product Grid */
.v3-container {
    max-width: 1400px;
    margin: 40px auto;
    padding: 0 20px;
}

.v3-product-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
}

@media (max-width: 1200px) {
    .v3-product-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}
@media (max-width: 900px) {
    .v3-product-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (max-width: 600px) {
    .v3-product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px; /* Giảm khoảng cách cho giao diện điện thoại */
    }
    .v3-container {
        padding: 0 10px; /* Tối ưu lề 2 bên */
    }
    .v3-product-title {
        font-size: 13px; /* Giảm cỡ chữ để chữ không bị tràn */
        line-height: 1.3;
    }
    .v3-product-price {
        font-size: 13px;
    }
    .v3-header {
        flex-direction: column;
        gap: 12px;
        padding: 15px 10px;
    }
    .v3-logo {
        order: 1;
    }
    .v3-header-right {
        order: 2;
        gap: 10px;
    }
    .v3-header-left {
        order: 3;
        margin-top: 5px;
    }
    .v3-header-left, .v3-header-right {
        flex-wrap: wrap;
        justify-content: center;
        gap: 15px;
        width: 100%;
    }
    .v3-header form {
        width: 100%;
        margin-right: 0 !important;
        order: 5;
    }
    .v3-header form input {
        width: 100% !important;
        box-sizing: border-box;
    }
}

.v3-product-card {
    display: block;
    text-decoration: none;
    color: var(--text-color);
    transition: transform 0.3s;
}

.v3-product-image-container {
    position: relative;
    width: 100%;
    padding-top: 100%; /* 1:1 Aspect ratio */
    background-color: #ffffff; /* White background for product images */
    overflow: hidden;
    margin-bottom: 15px;
    border-radius: 8px; /* Slightly rounded corners for a modern look */
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

.v3-product-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.5s ease;
}

.v3-img-front {
    opacity: 1;
    z-index: 2;
}

.v3-img-back {
    opacity: 0;
    z-index: 1;
}

.v3-product-card:hover .v3-img-front {
    opacity: 0;
}
.v3-product-card:hover .v3-img-back {
    opacity: 1;
}

.v3-product-info {
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 0 5px;
}

.v3-product-title {
    font-size: 14px;
    font-weight: 500;
}

.v3-product-price {
    font-size: 14px;
    color: var(--accent-color); /* Orange color for price */
    font-weight: bold;
}

.v3-add-cart-icon {
    position: absolute;
    bottom: 15px;
    right: 15px;
    background: var(--accent-color);
    color: #fff;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3;
    opacity: 0;
    transition: opacity 0.3s, transform 0.3s;
    box-shadow: 0 4px 10px rgba(230, 126, 34, 0.4);
}

.v3-product-card:hover .v3-add-cart-icon {
    opacity: 1;
}
.v3-add-cart-icon:hover {
    transform: scale(1.1);
}

/* Dropdown Menu Styles (Fallback if not overridden) */
.v3-dropdown {
    position: relative;
    display: inline-block;
}
.v3-dropdown-content {
    display: none;
    position: absolute;
    background-color: #ffffff;
    min-width: 160px;
    box-shadow: 0px 8px 25px 0px rgba(0,0,0,0.1);
    z-index: 100;
    top: 100%;
    left: 0;
    border: 1px solid #eee;
    border-radius: 8px;
    overflow: hidden;
}
.v3-dropdown-content a {
    color: #333333;
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    font-size: 14px;
}
.v3-dropdown-content a:hover {
    background-color: #f8f9fa;
    color: var(--accent-color);
}
.v3-dropdown:hover .v3-dropdown-content {
    display: block;
}
