@import url('https://fonts.googleapis.com/css2?family=Fredoka:wght@400;600;700&display=swap');

:root {
    --primary: #FF5722;   
    --secondary: #FFC107; 
    --accent: #00BCD4;    
    --bg-color: #E0F7FA;  
    --card-bg: #FFFFFF;
    --text-color: #263238;
}

/* Force strict box calculations on everything */
*, *::before, *::after {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
    width: 100vw;
    max-width: 100%;
    overflow-x: hidden !important; /* Forces scrollbar elimination */
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: 'Fredoka', cursive, sans-serif;
}

/* Header & Navigation */
header {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    padding: 15px;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
    border-bottom: 5px solid #FF9800;
    width: 100%;
}

.logo {
    font-size: clamp(20px, 4vw, 28px);
    font-weight: 700;
    color: #FFF;
    text-shadow: 2px 2px #000;
    text-decoration: none;
}

nav {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

nav a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #FFF;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    padding: 8px 14px;
    background: var(--accent);
    border-radius: 20px;
    box-shadow: 0 3px 0 #00838F;
    white-space: nowrap;
}

nav a:hover {
    transform: translateY(-2px);
}

nav a.logout-btn {
    background: #E91E63;
    box-shadow: 0 3px 0 #AD1457;
}

/* Container Fix: Strictly bounds width inside the screen */
.container {
    max-width: 850px;
    width: 90%;
    margin: 20px auto;
    background: var(--card-bg);
    padding: 20px;
    border-radius: 25px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
    border: 4px solid var(--secondary);
}

/* Hero Grid Layout */
.hero {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 25px;
    width: 100%;
}

.watch-container {
    flex: 0 0 320px; /* Locks the image section to a fixed max width on desktop */
    max-width: 100%;
}

.watch-gallery {
    display: flex;
    flex-direction: column; /* Stacks the two watch photos vertically */
    gap: 15px;
    width: 100%;
}

.watch-img {
    width: 100%;
    height: auto;
    border-radius: 20px;
    box-shadow: 0 6px 15px rgba(0,0,0,0.1);
    object-fit: contain;
}

.product-details {
    flex: 1; /* Takes up only remaining horizontal space */
    min-width: 260px; /* Prevents text from squishing too small */
}

/* Responsive adjustments for smaller screens */
@media (max-width: 768px) {
    .hero {
        flex-direction: column;
        align-items: center;
    }

    .watch-container {
        flex: 1 1 100%;
        width: 100%;
    }

    .watch-gallery {
        flex-direction: row; /* Side-by-side on mobile screens */
    }

    .watch-img {
        flex: 1;
        width: 50%;
    }
}

.product-details {
    flex: 1 1 300px;
    max-width: 100%;
}

.product-details h1 {
    font-size: clamp(22px, 3vw, 32px);
    color: var(--primary);
    margin-top: 0;
}

.product-details p {
    font-size: 15px;
    line-height: 1.5;
}

.buy-btn {
    display: block;
    text-align: center;
    background: #4CAF50;
    color: white;
    font-size: 18px;
    font-weight: 700;
    padding: 12px;
    border-radius: 30px;
    text-decoration: none;
    box-shadow: 0 4px 0 #2E7D32;
    border: none;
    cursor: pointer;
    margin-top: 15px;
    width: 100%;
}

.buy-btn:hover {
    background: #43A047;
}

/* Forms */
form label {
    display: block;
    margin-top: 15px;
    font-weight: 600;
    font-size: 15px;
}

form input[type="text"],
form input[type="email"],
form input[type="password"],
form input[type="tel"],
form input[type="file"],
form textarea {
    width: 100%;
    padding: 12px;
    margin-top: 5px;
    border: 2px solid var(--accent);
    border-radius: 12px;
    font-size: 16px;
    outline: none;
}

form textarea {
    resize: vertical;
    height: 100px;
}

.alert {
    padding: 12px;
    border-radius: 12px;
    margin-bottom: 15px;
    font-weight: 600;
}
.alert-error { background: #FFCDD2; color: #C62828; }
.alert-success { background: #C8E6C9; color: #2E7D32; }

/* Mobile Adjustments */
@media (max-width: 600px) {
    header {
        justify-content: center;
    }
    nav {
        justify-content: center;
    }
}