/* -----------------------------------------------------------
   GLOBAL BASE STYLES
----------------------------------------------------------- */

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

* {
    text-decoration: none !important;
}

html {
    max-width: 100vw;
    overflow-x: hidden;
    overflow-y: auto;
}

body {
    overflow: visible;
}


body {
    font-family: 'Montserrat', Arial, Helvetica, sans-serif;
    padding: 16px;
    color: #846D31;
    scrollbar-width: thin;
    scrollbar-color: #433E0E transparent;
}

main {
    margin-left: 36px;
}

/* -----------------------------------------------------------
   PAGE BACKGROUNDS
----------------------------------------------------------- */

body.home { background-color: #D9C576; color: #A38C2E; }
body.shop { background-color: #D9C576; }
body.about { background-color: #E2D686; }
body.contact { background-color: #E2D686; }
body.cart-page { background-color: #E2D686; }
body.product-page { background-color: #D9C576; }
body.cancel-page { background-color: #F2D4C2; }
body.success-page { background-color: #F2D4C2; }


/* -----------------------------------------------------------
   HOME PAGE LOGO POSITIONING
----------------------------------------------------------- */

.home-hero {
    display: flex;
    justify-content: left;   /* centers horizontally */
    align-items: left;
    /*padding-top: -20px;  space below header */
}

.home-logo {
    width: 400px;              /* adjust as needed */
    max-width: 60vw;           /* responsive scaling */
    display: block;
	margin-top:0px;
    margin-left: -60px;        /* ← move slightly left */
}

/* HOME PAGE — reposition nav independently */
@media (min-width: 721px) {
    main {
        margin-left: 36px;
    }
    
    body.home header nav {
        position: absolute;
        top: 115px;      /* moves nav DOWN the page */
        left: 220px;     /* moves nav RIGHT from the left edge */
        display: flex;
        gap: 26px;
    }
    .product {
        min-width: 410px;
    }
}

/* -----------------------------------------------------------
   HEADER — CLEAN + CONSISTENT
----------------------------------------------------------- */

header {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 24px;
    gap: 16px;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 40px;
    white-space: nowrap;
}

header h1 {
    margin: 0;
    font-size: 2.5rem;
}

header h1 a {
    color: inherit;
}

header nav {
    display: flex;
    align-items: center;
    gap: 25px;
}

header nav a {
    font-size: 1.15rem;
    font-weight: 600;
    color: inherit;
}

/* -----------------------------------------------------------
   CART ICON — ALWAYS VISIBLE
----------------------------------------------------------- */

.header-icons {
    display: flex;
    align-items: center;
    gap: 16px;
    position: absolute;
    top: 12px;
    right: 24px;
    z-index: 2001;
}

#cart-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 33px;
    height: 33px;
}

#cart-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

#cart-count {
    position: absolute;
    bottom: -8px;
    right: -8px;
    font-size: 19px;
    font-weight: 700;
    color: #3C787E;
    background: transparent;
    display: none; /* You can turn this on later */
}

/* -----------------------------------------------------------
   MOBILE MENU
----------------------------------------------------------- */

#mobile-menu-button {
    display: none;
    background: transparent;
    border: none;
    width: 26px;
    height: 26px;
    background-image: url('../images/menu.png');
    background-size: 100% 100%;
    background-repeat: no-repeat;
    background-position: center;
    cursor: pointer;
    z-index: 2002;
}

#mobile-nav {
    display: none;
}

body.mobile-nav-open {
    overflow: hidden; /* prevents background scrolling */
}


/* -----------------------------------------------------------
   MOBILE — UNIFIED STYLES
----------------------------------------------------------- */
@media (max-width: 720px) {

    /* HEADER */
    header {
        flex-wrap: wrap;
        padding-right: 70px;
    }

    header nav {
        display: none !important;
    }

    #mobile-menu-button {
        display: block;
        background-image: url('../images/menu.png'); /* correct path */
    }

    header h1 {
        font-size: 1.6rem;
        line-height: 1.2;
    }

    .header-left {
        gap: 16px;
        flex-wrap: wrap;
    }

    header h1 a {
        display: inline-block;
        max-width: 70vw;
        white-space: normal;
    }

    .header-icons {
        top: 16px;
        right: 16px;
        gap: 12px;
    }

    body.mobile-nav-open #mobile-nav {
        display: flex;
        flex-direction: column;
        position: fixed;
        left: 0; top: 0; right: 0; bottom: 0;
        padding: 80px 20px 20px;
        gap: 20px;
        background:#CBB86A;
        z-index: 2001;
    }

    #mobile-nav a {
        font-size: 1.1rem;
        padding: 14px 0;
        width: 100%;
    }

    /* PRODUCT PAGE */
    .product-detail-wrapper {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .product-main-image {
        height: 420px;
    }

    .product-thumbnails .thumb {
        width: 70px;
        height: 70px;
    }

    /* BACKGROUND FIXES */
    body {
        background-attachment: fixed;
        background-size: cover;
    }

    main {
        background: transparent !important;
        margin-left: 0;
        padding: 16px;
    }

    /* INSTAGRAM ICON */
    .puppy-instagram-img {
        width: 180px;
    }
    .puppy-instagram-link {
        bottom: -20px;
        left: -20px;
    }
}

/* ABOUT PAGE — Floating Puppy Instagram Icon */
.puppy-instagram-link {
    position: fixed;
    bottom: -40px;      /* pushes it slightly off-screen */
    left: -40px;        /* pushes it slightly off-screen */
    z-index: 5000;
    display: block;
}

.puppy-instagram-img {
    width: 400px;       /* large and bold */
    height: auto;
    cursor: pointer;
    transition: transform 0.25s ease, opacity 0.25s ease;
    opacity: 0.95;
}

.puppy-instagram-img:hover {
    transform: scale(1.02);
    opacity: 1;
}


/* -----------------------------------------------------------
   SHOP GRID + PRODUCT CARDS
----------------------------------------------------------- */

#products {
    display: grid;
    gap: 24px;
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 20px;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.product-link {
    height: 300px;
}


body.shop main,
body.product-page main {
    margin-left: 0;
    padding-top: 96px;
    display: block;
}

.product {
    border: 5px solid #E2D686;
    min-height: 380px;
    display: flex;
    flex-direction: column;
}

.product-link {
    flex: 0 0 66.666%;
    overflow: hidden;
}

.product-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-wrapper {
    flex: 0 0 33.333%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
}

.product-title {
    font-size: 1.1rem;
    font-weight: 700;
}

.product-price {
    font-size: 1rem;
    color: #A38C2E;
}

/* -----------------------------------------------------------
   PRODUCT PAGES
----------------------------------------------------------- */

body.product-page main {
    margin: 0 auto;
    padding: 40px 24px;
    max-width: 1400px;
}

/* Wrapper: two-column layout */
.product-detail-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: start;
}

/* Left column: gallery */
.product-gallery {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Main image */
.product-main-image {
    width: 100%;
    height: 600px;
    object-fit: contain;
    background: #F7EEC8;
    border-radius: 12px;
    cursor: zoom-in;
}

/* Thumbnails row */
.product-thumbnails {
    display: flex;
    gap: 12px;
}

.product-thumbnails .thumb {
    width: 90px;
    height: 90px;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
    opacity: 0.6;
    transition: opacity 0.2s, transform 0.2s;
}

.product-thumbnails .thumb:hover {
    opacity: 1;
    transform: scale(1.05);
}

.product-thumbnails .active-thumb {
    opacity: 1;
    outline: 3px solid #846D31;
}

/* Right column: product info */
.product-info {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* Title + price row */
.detail-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.detail-meta h2 {
    margin: 0;
    font-size: 2rem;
    font-weight: 700;
}

.detail-cost {
    font-size: 1.6rem;
    font-weight: 700;
    color: #846D31;
}

/* Description */
.detail-description {
    line-height: 1.6;
    font-size: 1.05rem;
}

/* Qty + Add to Cart */
.detail-actions {
    display: flex;
    gap: 16px;
    align-items: center;
}

/* Qty field */
.qty-input-wrap input {
    width: 90px;
    padding: 12px;
    border-radius: 8px;
    background: #D9C576;
    border: none;
    color: #846D31;
    font-weight: 600;
    font-size: 1rem;
    text-align: center;
}

.qty-input-wrap input::placeholder {
    color: #846D31;
    font-weight: 600;
}

/* Add to Cart button (inherits .cart-btn) */
.product-info .cart-btn {
    padding: 12px 20px;
    font-size: 1.1rem;
}

/* FULLSCREEN IMAGE VIEWER */
#image-viewer {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.85);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 5000;
    overflow: hidden;
}

#image-viewer-img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    cursor: grab;
    transition: transform 0.15s ease-out;
    touch-action: none;
}

#image-viewer-backdrop {
    position: absolute;
    inset: 0;
}


/* -----------------------------------------------------------
   MOBILE RESPONSIVE
----------------------------------------------------------- */

@media (max-width: 900px) {
    .product-detail-wrapper {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .product-main-image {
        height: 420px;
    }

    .product-thumbnails .thumb {
        width: 70px;
        height: 70px;
    }

    .detail-meta h2 {
        font-size: 1.6rem;
    }

    .detail-cost {
        font-size: 1.4rem;
    }
}


/* -----------------------------------------------------------
   CART PAGE
----------------------------------------------------------- */

.cart-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid rgba(0,0,0,0.06);
}

.cart-thumb {
    width: 64px;
    height: 64px;
    object-fit: cover;
    border-radius: 8px;
    margin-right: 12px;
}

.vertical-qty {
    display: flex;
    flex-direction: column;
}

.vertical-qty button {
    padding: 4px;
    border-radius: 6px;
    background: #D9C576;
    color: #A38C2E;
    border: 1px solid rgba(0,0,0,0.06);
    font-weight: 700;
}


.cart-btn {
    padding: 10px 18px;
    background: #D9C576;
    color: #846D31;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 600;
}

.cart-btn:hover {
    background: #cbb86a;
}

/* -----------------------------------------------------------
   CART PAGE — MOVED FROM INLINE
----------------------------------------------------------- */

.cart-page main {
    max-width: 900px;
    margin: 48px auto;
    padding: 16px;
}

#cart-contents > div {
    padding: 8px 0;
    border-bottom: 1px solid rgba(0,0,0,0.06);
}

.promo-row {
    display: flex;
    gap: 8px;
    margin-top: 6px;
    align-items: center;
}

#promo-section {
    margin-top: 12px;
}

#promo-code {
    padding: 8px;
    border-radius: 8px;
    border: transparent;
    min-width: 160px;
    background: #D9C576;
    color: #433E0E;
}

#promo-code:focus {
    outline: none;
	border: .5px solid #433E0E;   /* gold-brown border when clicked */
    background: #D9C576;         /* optional: slightly lighter background */
}

#promo-apply {
    background: #D9C576;
    color: #846D31;
    border-radius: 8px;
    padding: 8px 12px;
    cursor: pointer;
    font-family: inherit;
    font-size: inherit;
}

#promo-code::placeholder {
    color: #846D31;          /* gold-brown text */
    font-weight: 600;        /* bold like your buttons */
    font-family: 'Montserrat', sans-serif;  /* match your site font */
    opacity: 1;              /* ensures color is not faded */
}

#promo-code {
    background: #D9C576;
    color: #846D31;
	font-weight: 600;        /* bold like your buttons */
    font-family: 'Montserrat', sans-serif;  /* match your site font */
    opacity: 1;    
}

#checkout {
    margin-top: 18px;
    padding: 10px 16px;
    background: #D9C576;
    color: #846D31;
    border-radius: 6px;
    cursor: pointer;
    font-family: inherit;
    font-size: inherit;
}

/* Cart page — trash icon button */
.cart-rem {
    padding: 6px;
    background: none;
    color: #846D31;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
}

.cart-rem:hover {
    background: none;
}

.trash-icon {
    width: 28px;
    height: 28px;
    object-fit: contain;
    pointer-events: none; /* ensures clicking the icon still triggers the button */
}



/* GLOBAL SCROLLBAR — applies to ALL scrollable elements on ALL pages */

html {
    scroll-behavior: smooth;
}

* {
    scrollbar-width: thin;
    scrollbar-color: #433E0E transparent;
}

*::-webkit-scrollbar {
    width: 12px;
}

*::-webkit-scrollbar-track {
    background: transparent;
}

*::-webkit-scrollbar-thumb {
    background: #433E0E;
    border-radius: 999px;
}

