* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: #333;
    overflow-x: auto;
}

/* Header - White Background */
.header {
    background: white;
    color: #333;
    padding: 1rem 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    border-bottom: 2px solid #f0f0f0;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 2rem;
}

.logo {
    display: flex;
    align-items: center;
}

.logo-img {
    height: 40px;
    width: auto;
    object-fit: contain;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-menu a {
    color: #333;
    text-decoration: none;
    transition: color 0.3s;
    font-weight: 500;
    padding: 8px 12px;
    border-radius: 6px;
    position: relative;
}

.nav-menu a:hover {
    color: #ff8c42;
    background: rgba(255, 140, 66, 0.1);
}

.nav-menu a.active {
    color: #ff8c42;
    background: rgba(255, 140, 66, 0.1);
    font-weight: 600;
}

/* User and Cart Styles */
.user-section {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-button, .cart-button {
    background: rgba(255, 255, 255, 0.9);
    color: #666;
    border: 1px solid rgba(0, 0, 0, 0.1);
    padding: 10px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    font-size: 1.4rem;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.user-button:hover, .cart-button:hover {
    background: rgba(255, 140, 66, 0.1);
    border-color: rgba(255, 140, 66, 0.3);
    color: #ff8c42;
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(255, 140, 66, 0.15);
}

.user-button.logged-in {
    background: rgba(39, 174, 96, 0.1);
    border-color: rgba(39, 174, 96, 0.3);
    color: #27ae60;
}

.user-button.logged-in:hover {
    background: rgba(39, 174, 96, 0.15);
    border-color: rgba(39, 174, 96, 0.4);
    color: #27ae60;
    box-shadow: 0 4px 16px rgba(39, 174, 96, 0.15);
}

.cart-button {
    position: relative;
}

.cart-count {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #e74c3c;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Cart Sidebar */
.cart-sidebar {
    position: fixed;
    top: 0;
    right: -400px;
    width: 400px;
    height: 100vh;
    background: white;
    box-shadow: -2px 0 10px rgba(0,0,0,0.1);
    z-index: 2000;
    transition: right 0.3s ease;
    overflow-y: auto;
}

.cart-sidebar.open {
    right: 0;
}

.cart-header {
    padding: 1rem;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cart-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    margin-left: auto;
}

.cart-content {
    padding: 1rem;
}

.cart-item {
    display: flex;
    align-items: center;
    padding: 1rem 0;
    border-bottom: 1px solid #eee;
}

.cart-item-info {
    flex: 1;
    margin-left: 1rem;
}

.cart-item-title {
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.cart-item-price {
    color: #ff8c42;
    font-weight: bold;
}

.quantity-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0.5rem 0;
}

.qty-btn {
    background: #f0f0f0;
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.qty-btn:hover {
    background: #e0e0e0;
}

.cart-total {
    padding: 1rem;
    border-top: 2px solid #eee;
    text-align: center;
}

.total-amount {
    font-size: 1.5rem;
    font-weight: bold;
    color: #ff8c42;
    margin-bottom: 1rem;
}

.checkout-btn {
    background: #ff8c42;
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: bold;
    width: 100%;
    transition: background 0.3s;
}

.checkout-btn:hover {
    background: #e67e22;
}

/* Modal Styles */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 3000;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: 15px;
    padding: 2rem;
    width: 90%;
    max-width: 400px;
    position: relative;
}

.modal-close {
    position: absolute;
    top: 10px;
    right: 15px;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: bold;
}

.form-group input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
}

.form-btn {
    background: #ff8c42;
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 1rem;
    width: 100%;
    margin-top: 1rem;
}

.form-btn:hover {
    background: #e67e22;
}

.add-to-cart-btn {
    background: #ff8c42;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 20px;
    cursor: pointer;
    font-weight: bold;
    margin-top: 1rem;
    transition: background 0.3s;
}

.add-to-cart-btn:hover {
    background: #e67e22;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 2rem;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    animation: fadeInUp 1s ease;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    animation: fadeInUp 1s ease 0.2s both;
}

.cta-button {
    display: inline-block;
    background: white;
    color: #ff8c42;
    padding: 15px 30px;
    text-decoration: none;
    border-radius: 30px;
    font-weight: bold;
    transition: transform 0.3s;
    animation: fadeInUp 1s ease 0.4s both;
}

.cta-button:hover {
    transform: translateY(-2px);
}

/* About Section */
.about {
    padding: 100px 0;
    background: white;
}

.about-content {
    max-width: 1200px;
    margin: 0 auto;
}

.about-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 4rem;
    margin-bottom: 4rem;
    align-items: start;
}

.about-text h3 {
    font-size: 2rem;
    color: #333;
    margin-bottom: 1.5rem;
}

.about-text p {
    font-size: 1.1rem;
    color: #666;
    line-height: 1.8;
    margin-bottom: 2rem;
}

.about-features {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.feature-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: 15px;
    transition: transform 0.3s;
}

.feature-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.feature-icon {
    font-size: 2rem;
    width: 60px;
    height: 60px;
    background: #ff8c42;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.feature-content h4 {
    font-size: 1.2rem;
    color: #333;
    margin-bottom: 0.5rem;
}

.feature-content p {
    color: #666;
    font-size: 0.95rem;
    line-height: 1.6;
    margin: 0;
}

.about-stats {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

.stat-card {
    background: linear-gradient(135deg, #ff8c42, #ffa726);
    color: white;
    padding: 2rem 1.5rem;
    border-radius: 15px;
    text-align: center;
    transition: transform 0.3s;
}

.stat-card:hover {
    transform: translateY(-5px);
}

.stat-number {
    font-size: 2.5rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 0.9rem;
    opacity: 0.9;
}

.mission-vision {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
}

.mission, .vision {
    background: #f8f9fa;
    padding: 2.5rem;
    border-radius: 15px;
    border-left: 5px solid #ff8c42;
}

.mission h3, .vision h3 {
    font-size: 1.4rem;
    color: #333;
    margin-bottom: 1rem;
}

.mission p, .vision p {
    color: #666;
    line-height: 1.7;
    font-style: italic;
    font-size: 1rem;
}

/* Products Section */
.products {
    padding: 100px 0;
    background: #f8f9fa;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: #333;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.product-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

.product-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
}

.product-image {
    height: 200px;
    background: linear-gradient(45deg, #ff8c42, #ffa726);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
    font-weight: bold;
}

.product-content {
    padding: 1.5rem;
}

.product-content h3 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    color: #333;
}

.product-content p {
    color: #666;
    margin-bottom: 1rem;
}

.product-price {
    font-size: 1.2rem;
    font-weight: bold;
    color: #ff8c42;
}

/* Learning Center */
.learning-center {
    padding: 100px 0;
    background: white;
}

.videos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.video-card {
    background: #f8f9fa;
    border-radius: 15px;
    overflow: hidden;
    transition: transform 0.3s;
}

.video-card:hover {
    transform: translateY(-5px);
}

.video-thumbnail {
    height: 200px;
    background: #ddd;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.play-button {
    width: 60px;
    height: 60px;
    background: #ff8c42;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
}

.video-info {
    padding: 1.5rem;
}

.video-info h4 {
    margin-bottom: 0.5rem;
    color: #333;
}

.video-info p {
    color: #666;
    font-size: 0.9rem;
}

/* Registration Section */
.courses {
    padding: 100px 0;
    background: #f8f9fa;
}

.courses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.course-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    transition: transform 0.3s;
}

.course-card:hover {
    transform: translateY(-5px);
}

.course-header {
    background: linear-gradient(135deg, #ff8c42, #ffa726);
    color: white;
    padding: 1.5rem;
    text-align: center;
}

.course-price {
    font-size: 2rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.course-content {
    padding: 2rem;
}

.course-location {
    background: #e8f5e8;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    border-left: 4px solid #4caf50;
}

.course-schedule {
    background: #fff3e0;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    border-left: 4px solid #ff9800;
}

.course-features {
    list-style: none;
    margin-bottom: 2rem;
}

.course-features li {
    padding: 0.5rem 0;
    border-bottom: 1px solid #eee;
}

.course-features li:before {
    content: "✓";
    color: #ff8c42;
    font-weight: bold;
    margin-right: 0.5rem;
}

.register-button {
    display: block;
    background: #ff8c42;
    color: white;
    text-align: center;
    padding: 15px;
    text-decoration: none;
    border-radius: 10px;
    transition: background 0.3s;
}

.register-button:hover {
    background: #e67e22;
}

/* Footer */
.footer {
    background: #333;
    color: white;
    padding: 50px 0 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3 {
    margin-bottom: 1rem;
    color: #ff8c42;
}

.footer-section p, .footer-section li {
    color: #ccc;
    line-height: 1.8;
}

.footer-section ul {
    list-style: none;
}

.footer-section a {
    color: #ccc;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-section a:hover {
    color: #ff8c42;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid #555;
    color: #999;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive */
@media (max-width: 768px) {
    .nav-menu {
        display: none;
    }
    
    .user-section {
        gap: 0.5rem;
    }
    
    .user-button, .cart-button {
        width: 44px;
        height: 44px;
        padding: 8px;
    }
    
    .user-button svg, .cart-button svg {
        width: 20px;
        height: 20px;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .about-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .about-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    
    .stat-card {
        padding: 1.5rem 1rem;
    }
    
    .stat-number {
        font-size: 2rem;
    }
    
    .mission-vision {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .mission, .vision {
        padding: 1.5rem;
    }
    
    .feature-item {
        padding: 1rem;
    }
    
    .products-grid,
    .videos-grid,
    .courses-grid {
        grid-template-columns: 1fr;
    }
    
    .cart-sidebar {
        width: 100%;
        right: -100%;
    }
    
    .nav-container {
        padding: 0 1rem;
    }
    
    .logo-img {
        height: 32px;
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 1.8rem;
    }
    
    .hero p {
        font-size: 1rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .about-stats {
        grid-template-columns: 1fr;
    }
}
/* Hero Section */
.hero {
    position: relative;
    color: white;
    padding: 150px 0 100px;
    text-align: center;
    margin-top: 80px;
    overflow: hidden;
    min-height: 500px;
}

.hero-slider {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.hero-slider-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    margin: 0 auto;
    padding: 3rem 2rem;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 15px;
    backdrop-filter: blur(1px);
}
/* 
 * เพิ่มเติมใน styles.css สำหรับรองรับสินค้าจากฐานข้อมูล
 * เพิ่มที่ท้ายไฟล์ styles.css เดิม
 */

/* =================================
   ENHANCED PRODUCTS SECTION
================================= */

.products {
    position: relative;
    overflow: hidden;
}

.products::before {
    content: '';
    position: absolute;
    top: 0;
    left: -50%;
    width: 200%;
    height: 100%;
    background: linear-gradient(45deg, rgba(255, 140, 66, 0.02) 0%, rgba(255, 167, 38, 0.02) 100%);
    animation: shimmer 10s ease-in-out infinite;
    pointer-events: none;
}

@keyframes shimmer {
    0%, 100% { transform: translateX(-100%); }
    50% { transform: translateX(100%); }
}

/* Enhanced section title */
.section-title {
    position: relative;
    display: inline-block;
    width: 100%;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(135deg, #ff8c42, #ffa726);
    border-radius: 2px;
}

/* Products Grid Improvements */
.products-grid {
    position: relative;
    z-index: 2;
}

/* Enhanced Product Card Hover Effects */
.product-card {
    position: relative;
    background: white;
    overflow: hidden;
}

.product-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent 0%, 
        rgba(255, 140, 66, 0.1) 50%, 
        transparent 100%);
    transition: left 0.5s ease;
    z-index: 1;
}

.product-card:hover::before {
    left: 100%;
}

.product-card .product-content {
    position: relative;
    z-index: 2;
}

/* Enhanced Add to Cart Button */
.add-to-cart-btn {
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.add-to-cart-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.3s ease, height 0.3s ease;
    z-index: -1;
}

.add-to-cart-btn:hover::before {
    width: 300px;
    height: 300px;
}

/* Loading States */
.loading-container {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 140, 66, 0.1);
}

.loading-spinner {
    border-color: rgba(255, 140, 66, 0.2);
    border-top-color: #ff8c42;
}

.error-container {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(231, 76, 60, 0.1);
}

/* =================================
   BUTTON STATES AND ANIMATIONS
================================= */

/* Enhanced button loading state */
.add-to-cart-btn.loading {
    pointer-events: none;
    position: relative;
}

.add-to-cart-btn.loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent 0%, 
        rgba(255, 255, 255, 0.2) 50%, 
        transparent 100%);
    animation: loading-shimmer 1.5s infinite;
}

@keyframes loading-shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* Success animation */
.add-to-cart-btn.success {
    animation: success-pulse 0.6s ease;
}

@keyframes success-pulse {
    0% { transform: scale(1); box-shadow: 0 4px 15px rgba(39, 174, 96, 0.3); }
    50% { transform: scale(1.05); box-shadow: 0 6px 25px rgba(39, 174, 96, 0.5); }
    100% { transform: scale(1); box-shadow: 0 4px 15px rgba(39, 174, 96, 0.3); }
}

/* Error animation */
.add-to-cart-btn.error {
    animation: error-shake 0.5s ease;
}

@keyframes error-shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* =================================
   RESPONSIVE ENHANCEMENTS
================================= */

/* Large Desktop */
@media (min-width: 1400px) {
    .products-grid {
        grid-template-columns: repeat(3, 1fr);
        max-width: 1200px;
        margin: 0 auto;
    }
}

/* Desktop */
@media (min-width: 1200px) and (max-width: 1399px) {
    .products-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Large Tablet */
@media (min-width: 992px) and (max-width: 1199px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Tablet */
@media (min-width: 768px) and (max-width: 991px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
}

/* Mobile */
@media (max-width: 767px) {
    .products-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
        padding: 0 1rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .section-title::after {
        width: 60px;
        height: 3px;
    }
}

/* Small Mobile */
@media (max-width: 480px) {
    .products {
        padding: 60px 0;
    }
    
    .section-title {
        font-size: 1.8rem;
        margin-bottom: 2rem;
    }
    
    .products-grid {
        padding: 0 0.5rem;
    }
}

/* =================================
   ACCESSIBILITY IMPROVEMENTS
================================= */

/* Focus states */
.add-to-cart-btn:focus {
    outline: 3px solid rgba(255, 140, 66, 0.5);
    outline-offset: 2px;
}

.product-card:focus-within {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.15);
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .product-card {
        border: 2px solid #333;
    }
    
    .add-to-cart-btn {
        border: 2px solid white;
    }
    
    .product-badge {
        border: 1px solid white;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .product-card,
    .add-to-cart-btn,
    .product-badge,
    .loading-spinner {
        animation: none !important;
        transition: none !important;
    }
    
    .product-card:hover {
        transform: none;
    }
}

/* =================================
   PRINT STYLES
================================= */

@media print {
    .products {
        background: white !important;
        color: black !important;
        page-break-inside: avoid;
    }
    
    .product-card {
        border: 1px solid #ccc;
        box-shadow: none;
        page-break-inside: avoid;
        margin-bottom: 20px;
    }
    
    .add-to-cart-btn,
    .product-badges {
        display: none;
    }
    
    .product-image {
        background: #f0f0f0 !important;
        color: #333 !important;
    }
}

/* =================================
   DARK MODE SUPPORT (FUTURE)
================================= */

@media (prefers-color-scheme: dark) {
    .products {
        background: #1a1a1a;
    }
    
    .product-card {
        background: #2d2d2d;
        color: #e0e0e0;
        border: 1px solid #404040;
    }
    
    .section-title {
        color: #e0e0e0;
    }
    
    .product-content h3 {
        color: #e0e0e0;
    }
    
    .product-content p {
        color: #b0b0b0;
    }
    
    .loading-container,
    .error-container {
        background: rgba(45, 45, 45, 0.95);
        color: #e0e0e0;
        border-color: rgba(255, 140, 66, 0.2);
    }
}

/* =================================
   PERFORMANCE OPTIMIZATIONS
================================= */

/* GPU acceleration for transforms */
.product-card,
.add-to-cart-btn {
    will-change: transform, box-shadow;
    transform: translateZ(0);
}

/* Optimize repaints */
.product-image img {
    will-change: transform;
    transform: translateZ(0);
}

/* =================================
   UTILITIES
================================= */

/* Hidden but accessible text */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Smooth scrolling when clicking anchor links */
html {
    scroll-behavior: smooth;
}

/* Ensure consistent box-sizing */
.products *, 
.products *::before, 
.products *::after {
    box-sizing: border-box;
}

/* =================================
   SPECIFIC COMPONENT IMPROVEMENTS
================================= */

/* Enhanced product description */
.product-description {
    position: relative;
}

.product-description::after {
    content: '...';
    position: absolute;
    bottom: 0;
    right: 0;
    background: inherit;
    padding-left: 20px;
    background: linear-gradient(to right, transparent, white 50%);
}

/* Enhanced stock status */
.product-stock {
    font-size: 0.9rem;
    font-weight: 500;
    letter-spacing: 0.3px;
}

/* Enhanced price display */
.product-price {
    position: relative;
    font-variant-numeric: tabular-nums;
}

.product-price::before {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(135deg, #ff8c42, #ffa726);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

.product-card:hover .product-price::before {
    transform: scaleX(1);
}
