/* ============================================================
   GLOBAL VARIABLES (easy theme changes)
============================================================ */
:root {
    --brand-color: #0077cc;
    --brand-hover: #005fa3;
    --highlight-pink: #d60000;
    --text-dark: #333;
    --page-bg: #f2f2f2;

    --topbar-height: 120px;
    --icon-size: 30px;

    --card-shadow: 0 2px 6px rgba(0,0,0,0.1);
    --card-shadow-hover: 0 4px 12px rgba(0,0,0,0.2);
}

/* ============================================================
   BASIC GLOBAL PAGE STYLES
============================================================ */
body {
    margin: 0;
    background: var(--page-bg);
    color: var(--text-dark);
    font-family: 'Gill Sans', Calibri, Trebuchet MS, sans-serif;
    text-align: center;

    /* Push page under top bar */
    padding-top: 95px;
}

html {
    scroll-behavior: smooth;
    overflow-y: scroll;
}

img {
    display: block;
    margin: 20px auto;
    max-width: 100%;
    border-radius: 5px;
    transition: transform 0.3s;
}

/* ============================================================
   TITLES + TEXT
============================================================ */
h1 {
    text-align: center;
    color: var(--highlight-pink);
    margin-bottom: 30px;
}

h2, p {
    text-align: center;
    color: #131313;
}

/* ============================================================
   BUTTONS
============================================================ */
button {
    display: block;
    margin: 10px auto;
    padding: 10px 20px;
    font-size: 16px;
    background-color: var(--brand-color);
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.3s;
}

button:hover {
    background-color: var(--brand-hover);
}

/* ============================================================
   BACK TO TOP BUTTON
============================================================ */
#backToTop {
    position: fixed;
    bottom: 30px;
    right: 30px;
    padding: 10px 15px;
    font-size: 16px;
    background-color: var(--brand-color);
    color: white;
    border-radius: 5px;
    cursor: pointer;
    display: none;
    z-index: 100;
}

#backToTop:hover {
    background-color: var(--brand-hover);
}

/* ============================================================
   FIXED TOP BAR — SLIM, RESPONSIVE, SAFE
============================================================ */
#topBar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;

    height: 70px;
    background: white;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);

    display: flex;
    align-items: center;
    justify-content: space-between;

    padding: 0 15px;
    box-sizing: border-box;
    z-index: 5000;
}

/* -------- LOGO (rectangular + larger) -------- */
#logoBox {
    width: 120px;
    height: 45px;
    background: #e0e0e0;
    border-radius: 8px;

    display: flex;
    align-items: center;
    justify-content: center;

    font-size: 20px;
    font-weight: bold;
    text-decoration: none;
    color: #333;

    flex-shrink: 0;
}

/* -------- NAV -------- */
#mainNavbar {
    flex: 1;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
}

#mainNavbar .navItem {
    margin: 0 8px;
    opacity: 0;
    transform: translateY(-5px);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

nav a {
    text-decoration: none;
    color: var(--text-dark);
    font-weight: bold;
}
nav a:hover {
    color: var(--brand-color);
}

/* ============================================================
   ICON BAR — FIXED + SPACED
============================================================ */
#iconBar {
    display: flex;
    align-items: center;
    gap: 28px;           /* Proper spacing */
    flex-shrink: 0;
    padding-right: 10px;
}

#iconBar img,
#cartIcon img,
#userIcon img {
    width: var(--icon-size);
    height: var(--icon-size);
    filter: opacity(0.85);
    transition: 0.2s;
}
#iconBar img:hover {
    filter: opacity(1);
}

/* ============================================================
   USER MENU / DROPDOWN
============================================================ */
#userMenuContainer {
    position: relative !important;
}

#userDropdown {
    position: absolute;
    top: calc(var(--icon-size) + 30px); /* PERFECT ALIGNMENT */
    right: -5px; /* aligns visually with user icon */

    width: 180px;
    background: white;
    border-radius: 10px;
    padding: 12px 0;

    box-shadow: 0 4px 20px rgba(0,0,0,0.15);

    opacity: 0;
    transform: translateY(-10px);
    pointer-events: none;
    transition: opacity 0.25s ease, transform 0.25s ease;
}

#userMenuContainer:hover #userDropdown {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.dropdownItem {
    display: block;
    padding: 12px 18px;
    text-decoration: none;
    color: var(--text-dark);
    font-size: 15px;
    text-align: left; /* cleaner */
}

.dropdownItem:hover {
    background: #f4f4f4;
}

/* ============================================================
   CART BADGE
============================================================ */
#cartMenuContainer { position: relative !important; }
#cartIcon { position: relative; cursor: pointer; }

#cartBadge {
    position: absolute;
    top: -6px;
    right: -10px;

    background: var(--highlight-pink);
    color: white;

    padding: 2px 6px;
    font-size: 12px;
    border-radius: 50%;
    font-weight: bold;

    display: none;
}

/* ============================================================
   INDEX / INFO CARDS
============================================================ */
.indexcard {
    background: white;
    padding: 15px;
    margin: 15px auto;
    max-width: 600px;

    border-radius: 8px;
    box-shadow: var(--card-shadow);
    transition: transform 0.3s, box-shadow 0.3s;
}

.indexcard:hover {
    transform: translateY(-5px);
    box-shadow: var(--card-shadow-hover);
}

/* ============================================================
   GALLERY
============================================================ */
.gallery-wrapper {
    position: relative;
    max-width: 90%;
    margin: 20px auto;
}

.gallery-container {
    display: flex;
    gap: 10px;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    padding: 10px 0;
}

.gallery-container img {
    height: 150px;
    border-radius: 8px;
    opacity: 0.5;
    flex: 0 0 auto;
    object-fit: contain;
    transition: transform 0.5s ease, opacity 0.5s ease;
}

.gallery-container img.active {
    transform: scale(1.5);
    opacity: 1;
    z-index: 5;
}

.gallery-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.5);
    color: white;

    font-size: 30px;
    border: none;
    border-radius: 50%;
    padding: 10px;
    cursor: pointer;

    z-index: 10;
}

.gallery-btn:hover {
    background: rgba(0,0,0,0.8);
}

.gallery-btn.left { left: 0; }
.gallery-btn.right { right: 0; }

.gallery-indicators {
    margin-top: 10px;
}
.gallery-indicators span {
    width: 10px;
    height: 10px;
    margin: 0 5px;

    display: inline-block;
    border-radius: 50%;
    background: #ccc;

    cursor: pointer;
    transition: background 0.3s;
}
.gallery-indicators span.active {
    background: var(--brand-color);
}

/* ============================================================
   FOOTER — 4 COLUMN LAYOUT
============================================================ */

#footerWrapper {
    width: 100%;                                   /* full width */
    margin: 0;                                     /* remove gaps */
    padding: 50px 40px;                            /* top/bottom spacing */

    background: white;                             /* full-width box */
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);        /* shadow on top edge */

    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr;
    gap: 40px;

    text-align: left;
    box-sizing: border-box;
}

#footerWrapper > .footerCol,
#footerWrapper > .footerImageCol {
    max-width: 300px;
    margin: 0 auto;
}

/* Reset footer link alignment */
#footerWrapper a {
    text-decoration: none;
    color: #555;
    font-size: 15px;
    margin: 5px 0;
    display: block;
}

#footerWrapper a:hover {
    color: var(--brand-color);
}

/* Footer column style */
.footerCol h3 {
    margin-bottom: 15px;
    border-bottom: 2px solid #ddd;
    padding-bottom: 5px;
    font-size: 17px;
    color: #333;
}

.footerCol p {
    margin: 5px 0;
    color: #444;
    font-size: 14px;
}

/* Column 1 image (big logo/picture) */
.footerImageCol img {
    width: 100%;
    max-width: 260px;
    display: block;
    margin: auto;
    border-radius: 8px;
}

/* Social icons */
.socialIcons img {
    width: 28px;
    height: 28px;
    margin-right: 10px;
    opacity: 0.85;
    transition: 0.3s;
}

.socialIcons img:hover {
    opacity: 1;
}

/* Small informational image */
.footerSmallImg {
    margin-top: 15px;
    width: 140px;
    border-radius: 6px;
}

/* Bottom text */
footer p {
    text-align: center;
    color: #666;
    font-size: 14px;
}

footer hr {
    margin-top: 40px;
    border: none;
    border-top: 1px solid #ccc;
}

/* ============================================================
   RESPONSIVE — MOBILE & TABLET
============================================================ */

@media (max-width: 900px) {
    #footerWrapper {
        grid-template-columns: 1fr 1fr;
        text-align: center;
    }

    .footerCol h3 {
        text-align: center;
    }

    .footerImageCol img {
        margin-bottom: 20px;
    }
}

@media (max-width: 600px) {
    #footerWrapper {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .footerCol h3 {
        text-align: center;
    }

    .socialIcons {
        justify-content: center;
    }
}
