/* css/style.css - Public-facing styles */

:root {
    --primary-color: #e53935; /* Red */
    --secondary-color: #121212; /* Dark Gray/Black */
    --surface-color: #1e1e1e;
    --text-color: #f5f5f5;
    --text-primary: #f0f0f0;
    --text-secondary: #a0a7b3;
    --card-bg: #1e1e1e;
    --border-color: #3a4048;
    --font-family: 'SF Pro Display', sans-serif;
    --radius: 10px;
    --shadow: 0 4px 15px rgba(0,0,0,0.2);
}

body {
    font-family: var(--font-family);
    margin: 0;
    background-color: var(--secondary-color);
    color: var(--text-color);
    line-height: 1.6;
}
body.no-scroll {
    overflow: hidden;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
    box-sizing: border-box;
}

/* Hero Section */
.hero {
    padding: 6rem 1rem;
    text-align: center;
    position: relative;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    min-height: 400px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(to top, rgba(18, 18, 18, 0.9), rgba(18, 18, 18, 0.4)); /* Gradient overlay */
    z-index: 1;
}

.hero h2 {
    font-size: 3.5rem;
    color: var(--primary-color);
    animation: fadeInDown 1s ease-in-out;
    position: relative;
    z-index: 2;
    text-shadow: 0 2px 10px rgba(0,0,0,0.5);
}

.hero p {
    font-size: 1.2rem;
    max-width: 600px;
    margin: 0 auto;
    animation: fadeInUp 1s ease-in-out;
    position: relative;
    z-index: 2;
}

.hero-btn {
    margin-top: 2rem;
    position: relative;
    z-index: 2;
    padding: 14px 32px;
    font-size: 1.1rem;
    animation: fadeInUp 1s ease-in-out 0.2s;
    animation-fill-mode: backwards; /* Start animation even if delayed */
}

.secondary-hero {
    padding: 4rem 1rem; /* Slightly less padding than main hero */
    text-align: center;
    position: relative;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    min-height: 250px; /* Slightly shorter than main hero */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    margin-top: 4rem; /* Space from the products section */
    box-shadow: 0 5px 20px rgba(0,0,0,0.3); /* Subtle shadow */
}

.secondary-hero::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(to top, rgba(18, 18, 18, 0.8), rgba(18, 18, 18, 0.3)); /* Slightly different gradient */
    z-index: 1;
}

.secondary-hero h2 {
    font-size: 2.5rem; /* Slightly smaller heading */
    color: var(--primary-color);
    position: relative;
    z-index: 2;
    text-shadow: 0 2px 8px rgba(0,0,0,0.4);
}

.secondary-hero p {
    font-size: 1.1rem;
    max-width: 500px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.secondary-hero-btn {
    margin-top: 1.5rem;
    position: relative;
    z-index: 2;
}

.view-all-container {
    text-align: center;
    margin-top: 2.5rem;
}

main {
    padding: 2rem 1rem;
    max-width: 1200px;
    margin: 0 auto;
}

/* Products Grid */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.product-card {
    background-color: var(--card-bg);
    border-radius: var(--radius);
    overflow: hidden;
    text-decoration: none;
    color: var(--text-color);
    border: 1px solid var(--border-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    display: flex;
    flex-direction: column;
    opacity: 0;
    animation: fadeIn 0.5s ease-out forwards;
}

.product-card-image-container {
    position: relative;
    overflow: hidden;
    background-color: #2a2a2a;
}

.product-card-image, .product-card-image-placeholder {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.product-card-image-placeholder {
    background-color: #333;
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.3);
    border-color: var(--primary-color);
}

.product-card:hover .product-card-image {
    transform: scale(1.05);
}

.product-card:nth-child(2) { animation-delay: 0.1s; }
.product-card:nth-child(3) { animation-delay: 0.2s; }
.product-card:nth-child(4) { animation-delay: 0.3s; }
.product-card:nth-child(5) { animation-delay: 0.4s; }

.product-card-content {
    padding: 1rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    border-top: 1px solid var(--border-color);
}

.product-card-title {
    margin-top: 0;
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    flex-grow: 1; /* Pushes footer to the bottom */
}

.product-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1rem;
}

.product-card-price {
    font-weight: 500;
    font-size: 1.2rem;
    color: var(--primary-color);
}

.product-card-footer::after {
    content: 'arrow_forward';
    font-family: 'SF Pro Display', sans-serif;
    color: var(--text-secondary);
    opacity: 0;
    transform: translateX(-10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.product-card-tag {
    position: absolute;
    top: 10px;
    left: 10px;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: bold;
    text-transform: uppercase;
    z-index: 2;
}

.free-tag {
    background-color: var(--primary-color); /* Red */
}

.paid-tag {
    background-color: #2196F3; /* Blue */
}

/* User Auth Header Section */
.user-auth {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
}

.user-icon {
    width: 24px;
    height: 24px;
    color: var(--text-secondary);
}

#logout-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s;
}

#logout-link:hover {
    color: var(--primary-color);
}

.login-btn {
    padding: 8px 20px;
    font-size: 0.9rem;
    background-color: var(--primary-color);
    border: none;
    color: white;
}

.login-btn:hover {
    background-color: var(--primary-color-dark);
}

@media (max-width: 768px) {
    .login-btn {
        padding: 6px 12px;
        font-size: 0.8rem;
    }
}

/* Auth Page (Login/Sign Up) */
body.auth-page main {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 80vh;
}

.auth-container {
    width: 100%;
    max-width: 420px;
    margin: 0 auto;
    padding: 3rem 2.5rem;
    background-color: rgba(20, 20, 20, 0.75);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 24px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    position: relative;
    overflow: hidden;
}

/* Glow effect */
.auth-container::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(229, 57, 53, 0.15) 0%, transparent 60%);
    pointer-events: none;
    z-index: -1;
}

.auth-container h2 {
    text-align: center;
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 2rem;
    color: #fff;
    text-shadow: 0 0 20px rgba(229, 57, 53, 0.4);
}

/* Input Groups with Icons */
.input-group {
    position: relative;
    margin-bottom: 1.25rem;
}

.input-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
    pointer-events: none;
    transition: color 0.3s ease;
}

.input-group:focus-within .input-icon {
    color: var(--primary-color);
}

.auth-container input {
    width: 100%;
    padding: 14px 16px 14px 50px;
    margin-bottom: 0;
    background-color: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: #fff;
    font-size: 1rem;
    box-sizing: border-box;
    transition: all 0.3s ease;
}

.auth-container input:focus {
    outline: none;
    border-color: var(--primary-color);
    background-color: rgba(0, 0, 0, 0.5);
    box-shadow: 0 0 0 4px rgba(229, 57, 53, 0.15);
    transform: translateY(-1px);
}

/* Specific styling for buttons inside auth container */
.auth-container .login-btn {
    width: 100%;
    padding: 14px;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 12px;
    background: linear-gradient(135deg, #e53935, #c62828);
    box-shadow: 0 4px 15px rgba(229, 57, 53, 0.3);
    margin-top: 0.5rem;
    transition: all 0.3s ease;
}

.auth-container .login-btn:hover {
    background: linear-gradient(135deg, #ef5350, #d32f2f);
    box-shadow: 0 8px 25px rgba(229, 57, 53, 0.5);
    transform: translateY(-2px);
}

.auth-toggle {
    text-align: center;
    margin-top: 2rem;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.auth-toggle a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    margin-left: 5px;
    transition: color 0.2s;
}

.auth-toggle a:hover {
    color: #ff8a80;
    text-decoration: underline;
}

.or-separator {
    text-align: center;
    margin: 1.5rem 0;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.or-separator::before, .or-separator::after {
    content: '';
    flex-grow: 1;
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
    margin: 0 1rem;
}

.google-btn {
    width: 100%;
    background-color: rgba(255, 255, 255, 0.05);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 14px;
    border-radius: 12px;
    font-weight: 500;
    font-size: 1rem;
    transition: all 0.3s ease;
    cursor: pointer;
}
.google-btn:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.25);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}
.google-icon {
    width: 20px; 
    height: 20px;
}

.mobile-auth-msg {
    display: none;
    color: var(--text-secondary);
    text-align: center;
    font-size: 0.9rem;
    margin: 10px 0;
}

/* =================================== */
/* == Product Detail Page Styles == */
/* =================================== */

#product-detail-page {
    padding-top: 3rem;
    padding-bottom: 3rem;
    min-height: 60vh;
}

.product-detail-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: flex-start;
}

.product-image-gallery .product-main-image {
    width: 100%;
    height: auto;
    border-radius: var(--radius);
    background-color: var(--surface-color);
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
}

.product-info-panel .product-title {
    font-size: 2.5rem;
    margin: 0 0 0.5rem 0;
    line-height: 1.2;
    color: var(--text-primary);
}

.product-info-panel .product-price {
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 2rem;
}

.product-description h2 {
    font-size: 1.2rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.product-description p {
    color: var(--text-secondary);
}

.product-actions {
    margin-top: 2rem;
}

.cta-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background-color: var(--primary-color);
    color: white;
    text-decoration: none;
    padding: 16px 32px;
    border-radius: var(--radius);
    font-size: 1.1rem;
    font-weight: 600;
    transition: background-color 0.2s, transform 0.2s;
    border: none;
    cursor: pointer;
}
.cta-button:hover {
    background-color: #c62828; /* Darker Red */
    transform: translateY(-2px);
}
.cta-button .material-icons-outlined {
    font-size: 24px;
}

/* Loading and Error States */
.loading-spinner {
    border: 4px solid var(--border-color);
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 4rem auto;
}
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
.error-message {
    text-align: center;
    color: var(--text-secondary);
    font-size: 1.2rem;
    padding: 4rem 0;
}

.product-price {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
    margin: 1rem 0;
}

.btn {
    display: inline-block;
    padding: 12px 24px;
    background-color: var(--primary-color);
    color: white;
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
    text-align: center;
    border: none;
    cursor: pointer;
    transition: background-color 0.2s;
}

.btn:hover {
    background-color: #c62828; /* Darker Red */
}

.hidden {
    display: none !important;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in {
    animation: fadeIn 0.5s ease-out;
}

/* Form transition animations */
@keyframes slideIn {
    from { opacity: 0; transform: translateX(50px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes slideOut {
    from { opacity: 1; transform: translateX(0); }
    to { opacity: 0; transform: translateX(-50px); }
}

#login-form, #signup-form {
    animation-duration: 0.4s;
    animation-timing-function: ease-out;
    animation-fill-mode: forwards;
}

.form-enter {
    animation-name: slideIn;
}

.form-exit {
    animation-name: slideOut;
}

@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Responsive Design */
@media (max-width: 992px) {
    .product-detail-layout {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    .product-info-panel .product-title {
        font-size: 2rem;
    }
}

/* =================================== */
/* == About Page Styles == */
/* =================================== */

.page-hero {
    text-align: center;
    padding: 4rem 1rem;
    background-color: var(--surface-color);
    border-radius: var(--radius);
    margin-top: 2rem;
    margin-bottom: 3rem;
}

.page-hero h1 {
    font-size: 2.8rem;
    color: var(--primary-color);
    margin: 0 0 0.5rem 0;
}

.page-hero p {
    font-size: 1.2rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

.about-content .about-section {
    margin-bottom: 3rem;
}

.about-section h2 {
    font-size: 2rem;
    border-bottom: 2px solid var(--primary-color);
    display: inline-block;
    padding-bottom: 0.5rem;
    margin-bottom: 1.5rem;
}

.about-section p {
    color: var(--text-secondary);
    max-width: 800px;
    line-height: 1.7;
}

/* New Team Section Styles */
.team-section {
    padding: 60px 0;
    text-align: center;
}

.section-title {
    color: white;
    font-size: 2rem;
    margin-bottom: 40px;
    border-bottom: 2px solid var(--primary-color);
    display: inline-block;
    padding-bottom: 10px;
}

.team-container {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap; /* Essential for mobile stacking */
}

.team-card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 30px;
    width: 280px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-sizing: border-box;
}

.team-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.3);
}

.image-wrapper {
    margin-bottom: 20px;
}

.image-wrapper img {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    border: 3px solid var(--primary-color);
    box-shadow: 0 0 20px rgba(229, 57, 53, 0.4);
    object-fit: cover;
}

.team-card h3 {
    color: white;
    margin: 0;
    font-size: 1.4rem;
    margin-bottom: 5px;
}

.team-card p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin: 0;
}
/* =================================== */
/* == Community Stats Section == */
/* =================================== */

.community-stats-section {
    background-color: #1a1a1a; /* A dark, contrasting background */
    color: #fff;
    padding: 60px 20px;
    text-align: center;
}

.community-stats-section h2 {
    font-size: 2.5rem;
    margin-bottom: 50px;
    position: relative;
    display: inline-block;
    color: #f0f0f0;
}

/* Adds a stylish underline to the heading */
.community-stats-section h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, #ff4b4b, #ff8c4b); /* Gradient accent */
}

.stats-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 40px;
    flex-wrap: wrap; /* Ensures responsiveness on smaller screens */
}

.stat-box {
    background-color: #2c2c2c;
    padding: 25px 35px;
    border-radius: 10px;
    min-width: 260px;
    border: 1px solid #444;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    overflow: hidden; /* Important for the hover effect */
}

.stat-box:hover {
    transform: translateY(-8px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.4);
}

/* A subtle glow effect on hover */
.stat-box::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 75, 75, 0.15), transparent 40%);
    transition: opacity 0.5s ease;
    opacity: 0;
    pointer-events: none;
}

.stat-box:hover::before {
    opacity: 1;
}

.stat-icon {
    margin: 0 auto 15px auto;
    background-color: rgba(255, 255, 255, 0.05);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #555;
}

.stat-icon svg {
    width: 28px;
    height: 28px;
    stroke: #ff8c4b; /* Accent color for the icon */
}

.stat-box h3 {
    font-size: 3rem;
    font-weight: 700;
    color: #fff;
    margin: 0 0 5px 0;
    line-height: 1.1;
}

.stat-box p {
    font-size: 1rem;
    color: #b0b0b0; /* A lighter grey for readability */
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* =================================== */
/* == Tertiary Hero Section == */
/* =================================== */

.tertiary-hero {
    padding: 4rem 1rem;
    text-align: center;
    position: relative;
    background-color: var(--surface-color);
    background-size: cover;
    background-position: center;
    min-height: 250px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.tertiary-hero::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(to top, rgba(18, 18, 18, 0.8), rgba(18, 18, 18, 0.3));
    z-index: 1;
}

.tertiary-hero .container {
    position: relative;
    z-index: 2;
}

.tertiary-hero h2 {
    font-size: 2.5rem;
    color: var(--text-primary);
}

/* Skeleton Loading Animation */
.skeleton-card {
    opacity: 1 !important; /* Override fade-in animation for instant loading state */
    animation: none !important;
    pointer-events: none;
    border-color: #333;
}

.skeleton {
    background: #2a2a2a;
    background: linear-gradient(110deg, #2a2a2a 8%, #323232 18%, #2a2a2a 33%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite linear;
}

@keyframes shimmer {
    to { background-position-x: -200%; }
}

.skeleton-image { width: 100%; height: 200px; display: block; }
.skeleton-title { height: 20px; width: 70%; margin-bottom: 15px; border-radius: 4px; }
.skeleton-price { height: 20px; width: 30%; border-radius: 4px; }

/* Hide Google Sign-In on mobile/tablet devices */
@media (max-width: 1023px) {
    #google-signin-btn {
        display: none;
    }
    .mobile-auth-msg {
        display: block;
    }
}

/* Checkout Page Styles */
.checkout-layout {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 3rem;
    margin-top: 2rem;
    margin-bottom: 4rem;
}

.checkout-form-container, .order-summary {
    background-color: var(--card-bg);
    padding: 2rem;
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
}

.checkout-form-container h1, .order-summary h2 {
    margin-top: 0;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 1rem;
}

.checkout-form-container .form-group {
    margin-bottom: 1.5rem;
}

.checkout-form-container label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
}

.checkout-form-container input {
    width: 100%;
    padding: 12px;
    background-color: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    color: var(--text-color);
    font-size: 1rem;
    box-sizing: border-box;
}

.checkout-form-container input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.whatsapp-checkout-btn {
    /* 1. Reset all previous styles */
    all: unset; 
    
    /* 2. Basic Layout */
    display: flex !important;
    justify-content: center !important; /* හරහට හරියටම මැදට */
    align-items: center !important;     /* උඩ යට හරියටම මැදට */
    width: 100% !important;
    box-sizing: border-box !important;
    height: 55px !important;
    margin-top: 20px !important;
    cursor: pointer !important;
    
    /* 3. Colors & Branding */
    background-color: #25D366 !important;
    color: #ffffff !important;
    border-radius: 4px !important; /* Sharp corners */
    
    /* 4. Typography - No Caps & Centered */
    font-family: var(--font-family), sans-serif !important;
    font-size: 1.1rem !important;
    font-weight: 700 !important;
    text-align: center !important;
    text-transform: none !important;
    white-space: nowrap !important; /* එක පේළියට තබා ගැනීමට */
    
    /* 5. Clean Padding */
    padding: 0 !important; /* කිසිම padding එකක් අවශ්‍ය නැත flex center කරන නිසා */
    
    transition: background 0.3s ease !important;
}

.whatsapp-checkout-btn:hover {
    background-color: #1eb954 !important;
}

.summary-card {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.summary-image {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: var(--radius);
}

.summary-details h3 {
    margin: 0 0 0.5rem 0;
    font-size: 1.1rem;
    color: var(--text-primary);
}

.summary-price {
    margin: 0;
    font-weight: bold;
    color: var(--primary-color);
    font-size: 1.2rem;
}

@media (max-width: 768px) {
    .checkout-layout {
        grid-template-columns: 1fr;
    }
    .order-summary {
        order: -1; /* Show summary first on mobile */
    }
}
/* --- Final Mobile Centering Fix --- */
@media (max-width: 768px) {
    /* 1. Body එකේ horizontal scroll එක නැති කරන්න */
    body, html {
        overflow-x: hidden;
        width: 100%;
        margin: 0;
        padding: 0;
    }

    /* 2. මුළු Layout එකම මැදට ගන්න */
    .checkout-layout {
        display: flex;
        flex-direction: column;
        align-items: center; /* මැදට align කරයි */
        justify-content: center;
        width: 100% !important;
        margin: 0 auto !important;
        padding: 10px !important;
        box-sizing: border-box;
    }

    /* 3. Containers වල width එක හරියටම set කරන්න */
    .checkout-form-container, 
    .order-summary {
        width: 95% !important; /* Screen එකේ දෙපැත්තෙන් පොඩි ඉඩක් තබයි */
        max-width: 100% !important;
        margin: 10px 0 !important;
        padding: 20px !important; /* Padding අඩු කරන්න */
        box-sizing: border-box !important; /* Padding නිසා width එක වැඩි වීම නවත්වයි */
        float: none !important;
    }

    /* 4. Input fields screen එකට වඩා පළල වීම නවත්වන්න */
    input, textarea, .summary-card {
        width: 100% !important;
        box-sizing: border-box !important;
    }

    /* 5. Header එක හරියටම මැදට ගන්න */
    .header-container {
        width: 100%;
        display: flex;
        justify-content: space-between;
        padding: 10px 15px;
        box-sizing: border-box;
    }
}