:root {
    --primary-color: #ff3333;
    /* For the red logo */
    --text-color: #3d4246;
    --text-light: #888888;
    --bg-color: #f8f9fa;
    /* Light gray background to give contrast to white cards */
    --white: #ffffff;
    --border-color: #eaeaea;
    --accent-gradient: linear-gradient(135deg, #e0f2fe 0%, #ffffff 100%);
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.05), 0 4px 6px -2px rgba(0, 0, 0, 0.03);
    --shadow-hover: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --border-radius-sm: 8px;
    --border-radius-md: 16px;
    --border-radius-pill: 50px;
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
}

/* Header */
.header {
    background-color: var(--white);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
}

.logo-img {
    height: 56px;
    width: auto;
    object-fit: contain;
}

.logo-text h1 {
    font-size: 26px;
    font-weight: 800;
    letter-spacing: 1px;
    color: var(--text-color);
    line-height: 1.2;
}

.logo-text span {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-light);
}



/* Hero Section */
.hero {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    padding: 50px 20px;
    text-align: center;
    margin-bottom: 40px;
    border-bottom: 1px solid var(--border-color);
    box-shadow: inset 0 -4px 10px rgba(0, 0, 0, 0.2);
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.hero-title {
    font-size: 32px;
    font-weight: 800;
    margin-bottom: 8px;
    color: white;
    letter-spacing: 1px;
    text-transform: uppercase;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.hero-subtitle {
    font-size: 36px;
    font-weight: 900;
    background: linear-gradient(to right, #fcd34d, #f59e0b);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-transform: uppercase;
    letter-spacing: 1px;
    filter: drop-shadow(0px 2px 4px rgba(0, 0, 0, 0.4));
}

.hero-content p {
    font-size: 18px;
    color: #475569;
    font-weight: 500;
}

/* Main Content */
.main-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px 60px;
}

/* Search Bar */
.search-container {
    display: flex;
    justify-content: center;
    margin-bottom: 40px;
}

.search-bar {
    display: flex;
    align-items: center;
    background-color: var(--white);
    border-radius: var(--border-radius-pill);
    padding: 12px 24px;
    width: 100%;
    max-width: 600px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    border: 1px solid transparent;
}

.search-bar:focus-within {
    box-shadow: var(--shadow-md);
    border-color: #bae6fd;
}

.search-bar input {
    border: none;
    outline: none;
    background: transparent;
    padding-left: 12px;
    font-size: 16px;
    width: 100%;
    color: var(--text-color);
}

/* Categories */
.categories {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 40px;
}

.category-btn {
    padding: 10px 20px;
    background-color: var(--white);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-pill);
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-color);
    transition: var(--transition);
}

.category-btn:hover {
    box-shadow: var(--shadow-sm);
    transform: translateY(-2px);
}

.category-btn.active {
    background-color: var(--text-color);
    color: var(--white);
    border-color: var(--text-color);
}

/* Product Grid */
.products-grid {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: 24px;
    margin-bottom: 40px;
}

@media (min-width: 640px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 900px) {
    .products-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 1200px) {
    .products-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Product Card */
.product-card {
    background-color: var(--white);
    border-radius: var(--border-radius-md);
    overflow: hidden;
    position: relative;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-hover);
}

.product-image-container {
    position: relative;
    padding-top: 100%;
    /* 1:1 Aspect Ratio */
    background-color: #f1f5f9;
    overflow: hidden;
}

.product-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    /* ensures whole image is visible if it's not square */
    padding: 10px;
    transition: transform 0.5s ease;
}

.product-card:hover .product-image {
    transform: scale(1.05);
}



.product-info {
    padding: 16px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    justify-content: space-between;
}

.product-name {
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 12px;
    text-transform: uppercase;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: var(--transition);
}

.product-card:hover .product-name {
    color: #4f46e5;
}

.product-price {
    font-size: 16px;
    font-weight: 700;
    color: var(--primary-color);
}

.old-price {
    font-size: 12px;
    color: var(--text-light);
    text-decoration: line-through;
    margin-left: 8px;
    font-weight: 400;
}

/* Pagination */
.pagination-container {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 15px;
}

.product-count {
    font-size: 14px;
    color: var(--text-light);
}

.pagination {
    display: flex;
    gap: 8px;
}

.page-btn {
    width: 36px;
    height: 36px;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: var(--white);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-color);
    transition: var(--transition);
}

.page-btn:hover {
    background-color: #f1f5f9;
}

.page-btn.active {
    background-color: var(--text-color);
    color: var(--white);
    border-color: var(--text-color);
}

/* Footer */
.footer {
    background-color: var(--white);
    border-top: 1px solid var(--border-color);
    padding: 60px 20px 20px;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: 40px;
    margin-bottom: 40px;
}

@media (min-width: 768px) {
    .footer-container {
        grid-template-columns: repeat(3, 1fr);
    }
}

.footer-col h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 20px;
}

.footer-col ul {
    list-style: none;
}

.footer-col li {
    margin-bottom: 12px;
}

.footer-col a {
    color: var(--text-light);
    text-decoration: none;
    font-size: 14px;
    transition: var(--transition);
}

.footer-col a:hover {
    color: var(--text-color);
    text-decoration: underline;
}

.footer-col p {
    color: var(--text-light);
    font-size: 14px;
    margin-bottom: 20px;
}

.about-btn {
    padding: 10px 20px;
    background-color: var(--text-color);
    color: var(--white);
    border: none;
    border-radius: var(--border-radius-pill);
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: var(--transition);
}

.about-btn:hover {
    background-color: #000;
}

.footer-bottom {
    text-align: center;
    border-top: 1px solid var(--border-color);
    padding-top: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.footer-bottom p {
    font-size: 12px;
    color: var(--text-light);
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.product-card {
    animation: fadeIn 0.4s ease forwards;
}

/* Zalo Modal */
.zalo-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.zalo-modal.show {
    display: flex;
    opacity: 1;
}

.zalo-modal-content {
    background-color: white;
    padding: 20px;
    border-radius: 12px;
    text-align: center;
    position: relative;
    max-width: 90%;
    width: 350px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    transform: scale(0.95);
    transition: transform 0.3s ease;
}

.zalo-modal.show .zalo-modal-content {
    transform: scale(1);
}

.zalo-close {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    color: #888;
    line-height: 1;
}

.zalo-close:hover {
    color: #333;
}

.zalo-modal-content img {
    max-width: 100%;
    border-radius: 8px;
    display: block;
    margin: 0 auto;
}
/* Product description visibility: conservative safe rules */
/* Backed-up emergency rules were strict; keep minimal, less invasive styles */
.product-detail-desc,
.product-detail-desc .desc-content,
.product-detail-desc .desc-item,
.product-detail-desc .smart-desc,
.product-detail-desc .desc-heading,
.product-detail-desc .desc-paragraph {
  /* Ensure description is rendered and readable */
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  max-height: none !important;
  height: auto !important;
  color: var(--text-color) !important;
  background: transparent !important;
}

/* Paragraph style for normal description text */
.product-detail-desc .desc-paragraph {
  line-height: 1.65;
  margin: 0 0 10px 0;
  white-space: pre-wrap; /* keep line breaks if user types them */
  word-break: break-word;
}

/* Heading style inside description area */
.product-detail-desc .desc-heading {
  font-weight: 700;
  margin: 12px 0 8px;
}

/* Make sure bullets and subitems are readable without forcing layout changes */
.product-detail-desc .bullet { color: #111827 !important; }
.product-detail-desc .desc-content { color: var(--text-color) !important; }

/* Remove common clipping/transform that may hide content */
.product-detail-desc { transform: none !important; clip-path: none !important; }
/* Do NOT change position/z-index globally to avoid layout side effects */


/* Visit counter badge (top-right) */
.visit-counter{
  position: fixed;
  top: 10px;
  right: 10px;
  z-index: 9999;
  background: rgba(255,255,255,0.92);
  color: #111;
  border: 1px solid rgba(0,0,0,0.08);
  box-shadow: 0 8px 24px rgba(0,0,0,0.08);
  border-radius: 10px;
  padding: 8px 10px;
  font-size: 12px;
  line-height: 1.2;
}
.visit-counter span{font-weight:800;}
@media (max-width: 480px){
  .visit-counter{top: 8px; right: 8px; font-size: 11px; padding: 7px 9px;}
}
