/* Shop Page Styles */
.shop-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
}

/* Shop Header */
.shop-header {
    text-align: center;
    margin-bottom: 40px;
    padding: 40px 20px;
    background: linear-gradient(135deg, rgba(255, 22, 22, 0.1), rgba(93, 227, 226, 0.1));
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.shop-header h1 {
    font-size: 2.5rem;
    color: #ffffff;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
}

.shop-header h1 .material-icons-outlined {
    font-size: 2.5rem;
    color: #ff1616;
}

.shop-header p {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.8);
    max-width: 800px;
    margin: 0 auto 30px auto;
    line-height: 1.6;
}

/* Shop Division Toggle */
.shop-division-toggle {
    display: flex;
    justify-content: center;
    gap: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 25px;
    padding: 6px;
    max-width: 400px;
    margin: 0 auto;
}

.shop-division-toggle .division-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 20px;
    border: none;
    border-radius: 20px;
    background: transparent;
    color: rgba(255, 255, 255, 0.7);
    font-family: 'DM Sans', sans-serif;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.shop-division-toggle .division-btn:hover {
    color: white;
    background: rgba(255, 255, 255, 0.1);
}

.shop-division-toggle .division-btn.active {
    color: white;
    font-weight: 600;
}

.shop-division-toggle .gaming-btn.active {
    background: #ff1616;
    box-shadow: 0 4px 15px rgba(255, 22, 22, 0.3);
}

.shop-division-toggle .webdev-btn.active {
    background: linear-gradient(135deg, #3498db, #2980b9);
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.3);
}

/* Shop Controls */
.shop-controls {
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 20px;
    margin-bottom: 30px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.search-container {
    position: relative;
    display: flex;
    align-items: center;
}

.search-container .material-icons {
    position: absolute;
    left: 15px;
    color: rgba(255, 255, 255, 0.5);
    z-index: 1;
}

.search-container input {
    width: 100%;
    padding: 12px 15px 12px 45px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    color: white;
    font-family: 'DM Sans', sans-serif;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.search-container input:focus {
    outline: none;
    border-color: #5DE3E2;
    box-shadow: 0 0 0 3px rgba(93, 227, 226, 0.2);
    background: rgba(255, 255, 255, 0.15);
}

.search-container input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.filter-container select,
.sort-container select {
    padding: 12px 15px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    color: white;
    font-family: 'DM Sans', sans-serif;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.filter-container select:focus,
.sort-container select:focus {
    outline: none;
    border-color: #5DE3E2;
    box-shadow: 0 0 0 3px rgba(93, 227, 226, 0.2);
    background: rgba(255, 255, 255, 0.15);
}

.filter-container select option,
.sort-container select option {
    background: #1a1a1a;
    color: white;
}

/* Cart Summary */
.cart-summary {
    position: fixed;
    top: 100px;
    right: 20px;
    width: 340px;
    background: rgba(26, 26, 26, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 25px;
    z-index: 1000;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.4);
    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.cart-summary.visible {
    transform: translateX(0);
}

.cart-summary::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 22, 22, 0.1), rgba(93, 227, 226, 0.1));
    border-radius: 20px;
    z-index: -1;
}

.cart-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.cart-header h3 {
    display: flex;
    align-items: center;
    gap: 8px;
    color: white;
    font-size: 1.1rem;
    margin: 0;
}

.cart-count {
    background: #ff1616;
    color: white;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 600;
}

.cart-items {
    max-height: 200px;
    overflow-y: auto;
    margin-bottom: 15px;
}

.empty-cart {
    text-align: center;
    color: rgba(255, 255, 255, 0.6);
    padding: 20px;
    font-style: italic;
}

.cart-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.cart-item:last-child {
    border-bottom: none;
}

.cart-item img {
    width: 40px;
    height: 40px;
    object-fit: cover;
    border-radius: 5px;
}

.cart-item-info {
    flex: 1;
}

.cart-item-info h4 {
    color: white;
    font-size: 0.9rem;
    font-weight: 500;
    margin: 0 0 4px 0;
}

.cart-item-details {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.cart-item-details .price {
    color: #5DE3E2;
    font-size: 0.8rem;
    font-weight: 600;
}

.cart-item-details .quantity-controls {
    display: flex;
    align-items: center;
    gap: 5px;
}

.cart-item-details .quantity-controls button {
    width: 20px;
    height: 20px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border-radius: 3px;
    cursor: pointer;
    font-size: 0.7rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.cart-item-details .quantity-controls button:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
}

.cart-item-details .quantity-controls span {
    color: white;
    font-size: 0.8rem;
    min-width: 20px;
    text-align: center;
}

.remove-item {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.remove-item:hover {
    color: #ff1616;
    background: rgba(255, 22, 22, 0.1);
}

.cart-total {
    padding: 15px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
    color: white;
    font-size: 1.1rem;
}

.cart-actions {
    display: flex;
    gap: 10px;
}

.cart-actions button {
    flex: 1;
    padding: 10px;
    border: none;
    border-radius: 8px;
    font-family: 'DM Sans', sans-serif;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary {
    background: linear-gradient(135deg, #ff1616, #ff3333);
    color: white;
    border: none;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #ff3333, #ff1616);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 22, 22, 0.4);
}

.btn-primary:hover::before {
    left: 100%;
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.4);
    transform: translateY(-1px);
}

/* Section Headers */
.section-header {
    text-align: center;
    margin-bottom: 30px;
    padding: 20px;
    display: none;
}

.section-header.active {
    display: block;
}

.section-header h2 {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    color: white;
    font-size: 2rem;
    margin-bottom: 10px;
}

.section-header p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 1.1rem;
}

/* Products Grid */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 25px;
    margin-bottom: 50px;
}

.product-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: pointer;
    position: relative;
    transform: translateY(0);
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
    border-color: rgba(93, 227, 226, 0.5);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0.08));
}

.product-image {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 5px;
}

.product-card:hover .product-image img {
    transform: scale(1.05);
}

/* Image loading states */
.product-image img[src=""],
.product-image img:not([src]),
.product-image img[src="/data/logos/NEW_ConflictStudios_Logo.png"] {
    background: linear-gradient(45deg, rgba(255, 22, 22, 0.1), rgba(93, 227, 226, 0.1));
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-image img[src="/data/logos/NEW_ConflictStudios_Logo.png"]::after {
    content: "CS";
    color: rgba(255, 255, 255, 0.7);
    font-weight: bold;
    font-size: 2rem;
}

.product-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: #ff1616;
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    z-index: 10;
    box-shadow: 0 4px 15px rgba(255, 22, 22, 0.4);
    animation: badgePulse 2s infinite;
}

@keyframes badgePulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.product-badge.new {
    background: linear-gradient(135deg, #4CAF50, #45a049);
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.4);
}

.product-badge.sale {
    background: linear-gradient(135deg, #FF9800, #F57C00);
    box-shadow: 0 4px 15px rgba(255, 152, 0, 0.4);
}

.product-badge.popular {
    background: linear-gradient(135deg, #9C27B0, #7B1FA2);
    box-shadow: 0 4px 15px rgba(156, 39, 176, 0.4);
}

.product-badge.premium {
    background: linear-gradient(135deg, #FFD700, #FFC107);
    color: #000;
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.4);
}

.product-info {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.product-title {
    color: white;
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 8px;
    line-height: 1.3;
}

.product-description {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
    line-height: 1.4;
    margin-bottom: 15px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    line-clamp: 2;
    overflow: hidden;
}

.product-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 15px;
}

.product-tag {
    background: rgba(93, 227, 226, 0.2);
    color: #5DE3E2;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
}

.product-price {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

.price {
    color: #5DE3E2;
    font-size: 1.3rem;
    font-weight: 700;
    text-shadow: 0 0 10px rgba(93, 227, 226, 0.5);
    position: relative;
}

.price::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent, rgba(93, 227, 226, 0.1), transparent);
    border-radius: 4px;
    animation: priceShine 3s ease-in-out infinite;
}

@keyframes priceShine {
    0%, 100% { opacity: 0; }
    50% { opacity: 1; }
}

.price-old {
    color: rgba(255, 255, 255, 0.5);
    font-size: 1rem;
    text-decoration: line-through;
}

.product-actions {
    display: flex;
    gap: 10px;
    margin-top: auto; /* Push buttons to bottom */
}

.product-actions button {
    flex: 1;
    padding: 12px 16px;
    border: none;
    border-radius: 10px;
    font-family: 'DM Sans', sans-serif;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    position: relative;
    overflow: hidden;
    text-transform: none;
    letter-spacing: 0.3px;
    min-height: 44px;
}

/* Enhanced Add to Cart Button */
.add-to-cart-btn {
    background: linear-gradient(135deg, #5DE3E2, #4CAF50);
    color: white;
    border: 2px solid transparent;
    font-weight: 600;
    position: relative;
    z-index: 1;
}

.add-to-cart-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.6s ease;
    z-index: -1;
}

.add-to-cart-btn:hover {
    background: linear-gradient(135deg, #4CAF50, #5DE3E2);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(93, 227, 226, 0.4);
    border-color: rgba(255, 255, 255, 0.2);
}

.add-to-cart-btn:hover::before {
    left: 100%;
}

.add-to-cart-btn:active {
    transform: translateY(0) scale(0.98);
    transition: all 0.1s ease;
}

/* Success state animation */
.add-to-cart-btn.success {
    background: linear-gradient(135deg, #4CAF50, #45a049);
    animation: successPulse 0.6s ease;
}

.add-to-cart-btn.success .material-icons {
    animation: cartBounce 0.6s ease;
}

@keyframes successPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

@keyframes cartBounce {
    0%, 100% { transform: translateY(0); }
    25% { transform: translateY(-3px); }
    50% { transform: translateY(0); }
    75% { transform: translateY(-2px); }
}

/* Loading state */
.add-to-cart-btn.loading {
    pointer-events: none;
    opacity: 0.8;
}

.add-to-cart-btn.loading .material-icons {
    animation: spin 1s linear infinite;
}

/* Mobile optimizations */
@media (max-width: 480px) {
    .add-to-cart-btn {
        padding: 14px 18px;
        font-size: 15px;
        border-radius: 12px;
        gap: 10px;
    }
    
    .add-to-cart-btn .material-icons {
        font-size: 20px;
    }
}

/* Loading State */
.loading-state {
    text-align: center;
    padding: 60px 20px;
    color: rgba(255, 255, 255, 0.7);
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.1);
    border-left: 4px solid #5DE3E2;
    border-top: 4px solid #ff1616;
    border-radius: 50%;
    animation: spin 1s linear infinite, colorShift 3s ease-in-out infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes colorShift {
    0%, 100% { 
        border-left-color: #5DE3E2;
        border-top-color: #ff1616;
    }
    50% { 
        border-left-color: #ff1616;
        border-top-color: #5DE3E2;
    }
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: rgba(255, 255, 255, 0.7);
}

.empty-state .material-icons-outlined {
    font-size: 4rem;
    color: rgba(255, 255, 255, 0.3);
    margin-bottom: 20px;
}

.empty-state h3 {
    color: white;
    font-size: 1.5rem;
    margin-bottom: 10px;
}

/* NoScript Message */
.noscript-message {
    background: rgba(255, 22, 22, 0.1);
    border: 1px solid rgba(255, 22, 22, 0.3);
    border-radius: 15px;
    padding: 30px;
    margin: 30px 0;
    text-align: center;
}

.noscript-message h3 {
    color: #ff1616;
    font-size: 1.3rem;
    margin-bottom: 15px;
}

.noscript-message p {
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 15px;
    line-height: 1.6;
}

.noscript-message a {
    color: #5DE3E2;
    text-decoration: none;
}

.noscript-message a:hover {
    text-decoration: underline;
}

.noscript-message ul {
    text-align: left;
    max-width: 400px;
    margin: 20px auto;
    color: rgba(255, 255, 255, 0.8);
}

.noscript-message li {
    margin-bottom: 8px;
    padding-left: 10px;
}

/* Featured Section */
.featured-section {
    margin: 60px 0;
    padding: 40px 20px;
    background: linear-gradient(135deg, rgba(93, 227, 226, 0.1), rgba(255, 22, 22, 0.1));
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.featured-section h2 {
    text-align: center;
    color: white;
    font-size: 2rem;
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.featured-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
}

.featured-product-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: pointer;
    position: relative;
    transform: translateY(0);
}

.featured-product-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
    border-color: rgba(93, 227, 226, 0.5);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0.08));
}

.featured-product-image {
    position: relative;
    height: 180px;
    overflow: hidden;
}

.featured-product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.featured-product-card:hover .featured-product-image img {
    transform: scale(1.05);
}

.featured-product-info {
    padding: 20px;
}

.featured-product-info h3 {
    color: white;
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 8px;
    line-height: 1.3;
}

.featured-product-info p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
    line-height: 1.4;
    margin-bottom: 15px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    line-clamp: 2;
    overflow: hidden;
}

.featured-product-info .price {
    color: #5DE3E2;
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.featured-product-info .product-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.featured-product-info .tag {
    background: rgba(93, 227, 226, 0.2);
    color: #5DE3E2;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
}

/* Newsletter Section */
.newsletter-section {
    margin: 60px 0;
    padding: 40px;
    background: linear-gradient(135deg, rgba(255, 22, 22, 0.15), rgba(93, 227, 226, 0.15));
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
}

.newsletter-content h3 {
    color: white;
    font-size: 1.5rem;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.newsletter-content p {
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 25px;
}

.newsletter-form {
    display: flex;
    max-width: 400px;
    margin: 0 auto;
    gap: 10px;
}

.newsletter-form input {
    flex: 1;
    padding: 12px 15px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    color: white;
    font-family: 'DM Sans', sans-serif;
}

.newsletter-form input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.newsletter-form button {
    padding: 12px 20px;
    background: linear-gradient(135deg, #ff1616, #ff3333);
    color: white;
    border: none;
    border-radius: 10px;
    font-family: 'DM Sans', sans-serif;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.newsletter-form button:hover {
    background: linear-gradient(135deg, #ff3333, #ff1616);
    transform: translateY(-1px);
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
}

.modal-content {
    background: linear-gradient(135deg, #1a1a1a, #2a2a2a);
    margin: 2% auto;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 25px;
    width: 90%;
    max-width: 900px;
    max-height: 90vh;
    overflow-y: auto;
    animation: modalSlideIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(20px);
}

@keyframes modalSlideIn {
    from {
        transform: translateY(-80px) scale(0.9);
        opacity: 0;
    }
    to {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 25px 30px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-header h2 {
    color: white;
    margin: 0;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    color: rgba(255, 255, 255, 0.8);
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    z-index: 10;
}

.modal-close:hover {
    background: linear-gradient(135deg, rgba(255, 22, 22, 0.2), rgba(255, 22, 22, 0.1));
    border-color: rgba(255, 22, 22, 0.3);
    color: #ff1616;
    transform: scale(1.1) rotate(90deg);
    box-shadow: 0 8px 25px rgba(255, 22, 22, 0.3);
}

.modal-close:active {
    transform: scale(0.95) rotate(90deg);
    transition: transform 0.1s ease;
}

.modal-close:focus {
    outline: none;
    border-color: #ff1616;
    box-shadow: 0 0 0 3px rgba(255, 22, 22, 0.3);
}

.modal-close .material-icons {
    font-size: 24px;
    transition: transform 0.3s ease;
}

.modal-close:hover .material-icons {
    transform: rotate(90deg);
}

.modal-body {
    padding: 30px;
}

/* Enhanced Product Modal Styles */
.product-modal-content {
    max-width: 1200px;
    width: 95%;
    max-height: 95vh;
    background: linear-gradient(135deg, #1a1a1a, #2a2a2a);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    overflow: hidden;
    position: relative;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
}

.product-modal-header {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    padding: 30px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.product-images-section {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.main-image-container {
    position: relative;
    border-radius: 15px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.05);
}

#modal-main-image {
    width: 100%;
    height: 350px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

#modal-main-image:hover {
    transform: scale(1.05);
}

#modal-badge-container {
    position: absolute;
    top: 15px;
    left: 15px;
}

.image-thumbnails {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding: 5px 0;
}

.thumbnail {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
    opacity: 0.6;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.thumbnail:hover,
.thumbnail.active {
    opacity: 1;
    border-color: #5DE3E2;
    transform: scale(1.05);
}

.product-details-section {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.product-header h2 {
    color: white;
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 10px;
    line-height: 1.3;
}

.product-rating {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

.stars {
    display: flex;
    gap: 2px;
}

.stars .material-icons {
    font-size: 18px;
    color: #FFD700;
}

.rating-text {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
}

.product-price-section {
    background: rgba(255, 255, 255, 0.05);
    padding: 20px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.price-container {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 10px;
}

.current-price {
    color: #5DE3E2;
    font-size: 2rem;
    font-weight: 700;
    text-shadow: 0 0 10px rgba(93, 227, 226, 0.5);
}

.original-price {
    color: rgba(255, 255, 255, 0.5);
    font-size: 1.2rem;
    text-decoration: line-through;
}

.discount-badge {
    background: linear-gradient(135deg, #FF9800, #F57C00);
    color: white;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
}

.price-note {
    display: flex;
    align-items: center;
    gap: 6px;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
}

.price-note .material-icons {
    font-size: 16px;
}

.product-description-short {
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.6;
    font-size: 1rem;
}

.product-tags-section {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.product-tags-section .product-tag {
    background: rgba(93, 227, 226, 0.2);
    color: #5DE3E2;
    padding: 6px 12px;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 500;
}

.quantity-selection {
    display: flex;
    align-items: center;
    gap: 15px;
}

.quantity-selection label {
    color: white;
    font-weight: 600;
    font-size: 1rem;
}

.quantity-controls-enhanced {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.quantity-controls-enhanced button {
    background: transparent;
    border: none;
    color: white;
    padding: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.quantity-controls-enhanced button:hover {
    background: rgba(255, 255, 255, 0.1);
}

.quantity-controls-enhanced input {
    background: transparent;
    border: none;
    color: white;
    text-align: center;
    width: 60px;
    padding: 12px 8px;
    font-family: 'DM Sans', sans-serif;
    font-size: 1rem;
    font-weight: 600;
}

.quantity-controls-enhanced input:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.05);
}

.modal-actions-primary {
    display: flex;
    gap: 15px;
    margin-top: 10px;
}

.btn-add-to-cart,
.btn-buy-now {
    flex: 1;
    padding: 16px 24px;
    border: none;
    border-radius: 12px;
    font-family: 'DM Sans', sans-serif;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    position: relative;
    overflow: hidden;
}

.btn-add-to-cart {
    background: linear-gradient(135deg, #5DE3E2, #4CAF50);
    color: white;
    border: 2px solid transparent;
}

.btn-add-to-cart:hover {
    background: linear-gradient(135deg, #4CAF50, #5DE3E2);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(93, 227, 226, 0.4);
}

.btn-buy-now {
    background: linear-gradient(135deg, #ff1616, #ff3333);
    color: white;
    border: 2px solid transparent;
}

.btn-buy-now:hover {
    background: linear-gradient(135deg, #ff3333, #ff1616);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 22, 22, 0.4);
}

.product-modal-body {
    padding: 0;
}

.product-tabs {
    display: flex;
    background: rgba(255, 255, 255, 0.05);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.tab-btn {
    flex: 1;
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    padding: 20px 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: 'DM Sans', sans-serif;
    font-weight: 500;
    border-bottom: 3px solid transparent;
}

.tab-btn:hover {
    color: white;
    background: rgba(255, 255, 255, 0.05);
}

.tab-btn.active {
    color: #5DE3E2;
    border-bottom-color: #5DE3E2;
    background: rgba(93, 227, 226, 0.1);
}

.tab-content {
    padding: 30px;
}

.tab-panel {
    display: none;
}

.tab-panel.active {
    display: block;
}

.tab-panel h3 {
    color: white;
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.features-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.features-list li {
    color: rgba(255, 255, 255, 0.8);
    padding: 12px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    gap: 12px;
    line-height: 1.5;
}

.features-list li::before {
    content: 'check_circle';
    font-family: 'Material Icons';
    color: #4CAF50;
    font-size: 20px;
}

.features-list li:last-child {
    border-bottom: none;
}

.details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.detail-item {
    background: rgba(255, 255, 255, 0.05);
    padding: 15px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.detail-label {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
    display: block;
    margin-bottom: 5px;
}

.detail-value {
    color: white;
    font-weight: 600;
    font-size: 1rem;
}

.reviews-summary {
    background: rgba(255, 255, 255, 0.05);
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 20px;
    text-align: center;
}

.average-rating {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.rating-number {
    color: #FFD700;
    font-size: 2.5rem;
    font-weight: 700;
}

.rating-stars {
    display: flex;
    gap: 3px;
}

.rating-stars .material-icons {
    color: #FFD700;
    font-size: 24px;
}

.rating-count {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
}

.reviews-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.review-item {
    background: rgba(255, 255, 255, 0.05);
    padding: 20px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.reviewer-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.reviewer-name {
    color: white;
    font-weight: 600;
}

.review-rating {
    display: flex;
    gap: 2px;
}

.review-rating .material-icons {
    color: #FFD700;
    font-size: 16px;
}

.review-text {
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.5;
    margin-bottom: 10px;
}

.review-date {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.8rem;
}

.modal-footer {
    background: rgba(255, 255, 255, 0.05);
    padding: 20px 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.security-badges {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
}

.security-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
}

.security-badge .material-icons {
    color: #4CAF50;
    font-size: 18px;
}

/* Mobile optimizations for product modal */
@media (max-width: 768px) {
    .product-modal-content {
        width: 98%;
        max-height: 98vh;
        margin: 1% auto;
        border-radius: 15px;
    }
    
    .product-modal-header {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 20px;
    }
    
    .product-images-section {
        order: -1;
    }
    
    #modal-main-image {
        height: 250px;
    }
    
    .product-header h2 {
        font-size: 1.4rem;
    }
    
    .current-price {
        font-size: 1.6rem;
    }
    
    .modal-actions-primary {
        flex-direction: column;
    }
    
    .product-tabs {
        overflow-x: auto;
    }
    
    .tab-btn {
        min-width: 120px;
        white-space: nowrap;
    }
    
    .tab-content {
        padding: 20px;
    }
    
    .details-grid {
        grid-template-columns: 1fr;
    }
    
    .security-badges {
        gap: 15px;
    }
    
    .security-badge {
        font-size: 0.8rem;
    }
}

/* Checkout Modal */
.checkout-modal {
    max-width: 800px;
}

.checkout-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.checkout-summary {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    padding: 25px;
}

.checkout-summary h3 {
    color: white;
    margin-bottom: 20px;
    font-size: 1.2rem;
}

.checkout-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.checkout-item:last-child {
    border-bottom: none;
}

.checkout-item-info {
    flex: 1;
}

.checkout-item-name {
    color: white;
    font-weight: 500;
    margin-bottom: 4px;
}

.checkout-item-details {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
}

.checkout-item-price {
    color: #5DE3E2;
    font-weight: 600;
}

.checkout-total {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.total-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    color: rgba(255, 255, 255, 0.8);
}

.total-row.total {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    font-size: 1.1rem;
}

.payment-section h3 {
    color: white;
    margin-bottom: 20px;
    font-size: 1.2rem;
}

.payment-info {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1rem;
    margin-bottom: 20px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.checkout-btn {
    width: 100%;
    padding: 15px;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

/* Success Modal */
.success-modal {
    max-width: 500px;
}

.success-content {
    text-align: center;
    padding: 20px;
}

.success-icon {
    margin-bottom: 20px;
}

.success-icon .material-icons {
    font-size: 4rem;
    color: #4CAF50;
}

.success-content h2 {
    color: white;
    margin-bottom: 15px;
    font-size: 1.8rem;
}

.success-content p {
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 25px;
    line-height: 1.6;
}

/* Additional Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.product-card {
    animation: fadeInUp 0.6s ease forwards;
}

.product-card:nth-child(odd) {
    animation-delay: 0.1s;
}

.product-card:nth-child(even) {
    animation-delay: 0.2s;
}

/* -----------------------------
   Responsive / Mobile tweaks
   ----------------------------- */

/* General adjustments for tablets and phones */
@media (max-width: 900px) {
    .shop-container {
        padding: 14px;
        max-width: 1000px;
    }

    .shop-header {
        padding: 24px 14px;
        border-radius: 14px;
    }

    .shop-header h1 {
        font-size: 1.8rem;
        gap: 10px;
    }

    .shop-header p {
        font-size: 1rem;
        max-width: 100%;
    }

    .shop-division-toggle {
        max-width: 100%;
        padding: 6px;
        gap: 6px;
    }

    .shop-controls {
        grid-template-columns: 1fr;
        gap: 12px;
        padding: 14px;
        align-items: stretch;
    }

    .filter-container select,
    .sort-container select,
    .search-container input {
        width: 100%;
        font-size: 0.95rem;
    }

    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
        gap: 18px;
    }

    .product-image {
        height: 170px;
    }

    .product-info {
        padding: 14px;
    }

    .product-actions button,
    .product-actions .btn-secondary,
    .product-actions .btn-primary {
        padding: 12px;
        font-size: 0.95rem;
    }

    .featured-grid {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    }
}

/* Mobile phones: compact layout and touch-friendly controls */
@media (max-width: 480px) {
    .shop-container {
        padding: 12px 10px;
    }

    .shop-header h1 {
        font-size: 1.4rem;
    }

    .shop-header p {
        font-size: 0.95rem;
    }

    .shop-division-toggle {
        flex-wrap: wrap;
        gap: 8px;
    }

    .shop-division-toggle .division-btn {
        padding: 10px 14px;
        font-size: 13px;
    }

    .shop-controls {
        grid-template-columns: 1fr;
        padding: 12px;
    }

    .search-container .material-icons {
        left: 12px;
    }

    .search-container input {
        padding: 12px 14px 12px 42px;
    }

    .products-grid {
        grid-template-columns: 1fr;
        gap: 14px;
        margin-bottom: 30px;
    }

    .product-image {
        height: 140px;
    }

    .product-image img {
        border-radius: 6px;
    }

    .product-info {
        padding: 12px;
    }

    .product-info h3 {
        font-size: 1.05rem;
    }

    .product-description {
        font-size: 0.9rem;
        -webkit-line-clamp: 3;
        line-clamp: 3; /* standard property for compatibility */
    }

    .product-actions {
        flex-direction: column;
    }

    .product-actions button {
        width: 100%;
    }

    /* Cart summary becomes a bottom sheet on mobile */
    .cart-summary {
        top: auto;
        bottom: 0;
        left: 0;
        right: 0;
        width: 100%;
        max-width: 100%;
        border-radius: 12px 12px 0 0;
        transform: translateY(110%);
        padding: 16px;
        box-shadow: 0 -8px 30px rgba(0,0,0,0.6);
    }

    .cart-summary.visible {
        transform: translateY(0);
    }

    .cart-items {
        max-height: 180px;
    }

    .cart-header h3 {
        font-size: 1rem;
    }

    .cart-actions {
        flex-direction: column;
    }

    .cart-actions button {
        width: 100%;
        padding: 12px;
    }

    /* Modal adaptions for small screens */
    .modal-content {
        width: 98%;
        max-width: 980px;
        margin: 4% auto;
        border-radius: 14px;
        max-height: 92vh;
    }

    .product-details {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .product-images {
        order: -1; /* show images above info for easier scrolling */
    }

    .quantity-controls button {
        width: 40px;
        height: 40px;
    }

    .quantity-controls input {
        width: 72px;
        height: 40px;
    }

    .newsletter-form {
        flex-direction: column;
        gap: 10px;
    }

    .newsletter-form input,
    .newsletter-form button {
        width: 100%;
    }
}

/* Accessibility: increase hit area for small touch devices */
@media (hover: none) and (pointer: coarse) {
    .division-btn,
    .btn-primary,
    .btn-secondary,
    .product-actions button,
    .cart-actions button {
        padding: 14px 16px;
        touch-action: manipulation;
        min-height: 44px;
        min-width: 44px;
    }
    
    /* Better touch feedback */
    .product-card {
        transition: transform 0.1s ease;
    }
    
    .product-card:active {
        transform: scale(0.98);
    }
    
    .btn-primary:active,
    .btn-secondary:active {
        transform: scale(0.95);
    }
}

/* Additional mobile enhancements */
@media (max-width: 480px) {
    /* Improve readability */
    body {
        font-size: 16px;
        line-height: 1.5;
    }
    
    /* Better spacing */
    .shop-container {
        padding: 8px;
    }
    
    .section-header {
        padding: 15px 10px;
        margin-bottom: 20px;
    }
    
    .section-header h2 {
        font-size: 1.5rem;
        margin-bottom: 8px;
    }
    
    .section-header p {
        font-size: 0.9rem;
    }
    
    /* Improved product tags */
    .product-tags {
        gap: 4px;
        margin-bottom: 12px;
    }
    
    .product-tag {
        padding: 3px 6px;
        font-size: 0.7rem;
        border-radius: 8px;
    }
    
    /* Better modal spacing */
    .modal-header {
        padding: 15px;
    }
    
    .modal-body {
        padding: 15px;
    }
    
    .modal-close {
        top: 15px;
        right: 15px;
        width: 45px;
        height: 45px;
        font-size: 1.2rem;
        border-width: 1.5px;
    }
    
    .modal-close .material-icons {
        font-size: 20px;
    }
    
    .modal-close:hover {
        transform: scale(1.05) rotate(90deg);
    }
    
    /* Improved cart items */
    .cart-item {
        padding: 12px 0;
    }
    
    .cart-item img {
        width: 50px;
        height: 50px;
    }
    
    .cart-item-info h4 {
        font-size: 0.95rem;
        margin-bottom: 6px;
    }
    
    .cart-item-details .quantity-controls button {
        width: 32px;
        height: 32px;
        font-size: 0.8rem;
    }
    
    .cart-item-details .quantity-controls span {
        font-size: 0.85rem;
        min-width: 24px;
    }
    
    /* Loading and empty states */
    .loading-state,
    .empty-state {
        padding: 40px 20px;
    }
    
    .loading-spinner {
        width: 40px;
        height: 40px;
        margin-bottom: 15px;
    }
    
    .empty-state .material-icons-outlined {
        font-size: 3rem;
        margin-bottom: 15px;
    }
    
    .empty-state h3 {
        font-size: 1.2rem;
        margin-bottom: 8px;
    }
}

/* High DPI displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .product-image img,
    .featured-product-image img,
    .cart-item img {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
    .shop-header {
        padding: 15px;
        margin-bottom: 15px;
    }
    
    .shop-header h1 {
        font-size: 1.4rem;
        flex-direction: row;
        gap: 8px;
    }
    
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    
    .product-image {
        height: 140px;
    }
    
    .cart-summary {
        max-height: 60vh;
    }
}
