/* Universal Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Lucida Sans', 'Lucida Sans Regular', 'Lucida Grande', 'Lucida Sans Unicode', Geneva, Verdana, sans-serif;
}
.fixed-bg {
    display: none; /* hide on larger screens if not needed */
  }

html, body {
    height: 100%;
}

/* Typography */
.merriweather-mrw {
    font-family: "Merriweather", serif;
    font-optical-sizing: auto;
    font-weight: 700;
    font-style: normal;
    font-variation-settings: "wdth" 100;
}

/* Base Body Styles */


/* Link Resets */
a {
    text-decoration: none;
}
.no_underline {
    text-decoration: none; /* Renamed to match property */
}

/* Centering Utility Classes */
.cnt {
    display: flex;
    justify-content: center;
    align-items: center;
}
.cnt_col {
    flex-direction: column;
}

/* Header */
header {
    z-index: 10;
    background-color: white;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.1); /* Corrected box-shadow syntax */
    margin: 0;
    padding: 0 10px;
    height: 80px; /* Consistent height */
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

.upperpart {
    position: relative;
    height: 100%;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.upperpart > a {
    width: 45px;
    height: 45px;
}

nav {
    display: flex;
    justify-content: space-around;
    align-items: center;
    height: 100%;
    /* width: 45%; commented out as it implies a fixed width which might conflict with font-size */
    font-size: clamp(16px, 1.2vw, 24px); /* Adjusted for better responsiveness */
}

.logo-container {
    padding: 10px;
    background-image: url('images/logo2.JPG');
    background-size: cover;
    background-repeat: no-repeat;
    min-width: 150px;
    height: 100%;
    background-position: center;
}

/* --- WOOD BUTTON MIXIN/SHARED STYLES (Concept) --- */
/* Define custom properties for wood texture */
:root {
    --wood-base: #8b5e3c;
    --wood-highlight: #a67853;
    --wood-shadow: #5a3f23;
    --wood-grain-dark: rgba(143, 72, 2, 0.4); /* Used for main buttons */
    --wood-grain-light: rgba(255, 230, 2, 0.284); /* Used for main buttons */
    --wood-grain-dark-bg: rgba(50, 30, 10, 0.4); /* Used for wood_background */
    --wood-grain-light-bg: rgba(255, 255, 255, 0.15); /* Used for wood_background */
}

.wood-texture-base {
    background-repeat: repeat, repeat, no-repeat;
    background-position: 0 0, 0 0, 0 0;
    background-size: auto, auto, cover;
    border: 3px solid var(--wood-shadow);
    box-shadow:
        inset 0 4px 8px rgba(255, 255, 255, 0.2),
        inset 0 -6px 8px rgba(0, 0, 0, 0.3),
        0 6px 10px rgba(0, 0, 0, 0.6);
    cursor: pointer;
    transition: background 0.3s ease, box-shadow 0.2s ease, transform 0.2s ease; /* Added transform */
    user-select: none;
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.6);
}

.wood-texture-hover-active {
    box-shadow:
        inset 0 6px 10px rgba(255, 255, 255, 0.3),
        inset 0 -8px 12px rgba(0, 0, 0, 0.4),
        0 8px 10px rgba(0, 0, 0, 0.7);
}

.wood-texture-active {
    box-shadow: inset 0 2px 2px rgba(0, 0, 0, 0.7);
    transform: translateY(2px);
}

/* Wood Button (Rectangular) */
.wood-button {
    z-index: 5;
    margin: 0 7px;
    min-width: 90px; /* Changed from 70px to 90px as per your later definition */
    height: 50px;
    font-size: clamp(16px, 1vw, 32px);
    font-weight: 700;
    color: #1c1c1c; /* Changed from #f2d775, assuming you want the darker text */
    text-align: center;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 12px;

    /* Base wood texture */
    background-image:
        repeating-linear-gradient(45deg, var(--wood-grain-dark), var(--wood-grain-dark) 1px, transparent 2px, transparent 5px),
        repeating-linear-gradient(-45deg, var(--wood-grain-light), var(--wood-grain-light) 1px, transparent 2px, transparent 5px),
        linear-gradient(90deg, var(--wood-base), var(--wood-highlight), var(--wood-base));

}
.wood-button {
    /* transform: translateY(2px) ease .5s; */
    background-repeat: repeat, repeat, no-repeat;
    background-position: 0 0, 0 0, 0 0;
    background-size: auto, auto, cover;
    border: 3px solid var(--wood-shadow);
    box-shadow:
        inset 0 4px 8px rgba(255, 255, 255, 0.2),
        inset 0 -6px 8px rgba(0, 0, 0, 0.3),
        0 6px 10px rgba(0, 0, 0, 0.6);
    cursor: pointer;
    transition: background 0.3s ease, box-shadow 0.2s ease, transform 0.2s ease;
    user-select: none;
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.6);
    transition: transform 0.2s ease-in-out, background 0.3s ease, box-shadow 0.2s ease;

}


.wood-button:hover {
    color: white; /* Only change color on hover here */
    background-image: /* Specific hover background */
        repeating-linear-gradient(45deg, var(--wood-grain-dark), var(--wood-grain-dark) 1px, transparent 2px, transparent 5px),
        repeating-linear-gradient(-45deg, var(--wood-grain-light), var(--wood-grain-light) 1px, transparent 2px, transparent 5px),
        linear-gradient(90deg, #a3744c, #c1a17d, #a3744c);
    position: relative;
    transform: translateY(-5px); /* Smooth upward movement */
    /* transform:translateY(-1px); */
    transition: transform .2s ease-in-out;
    box-shadow:
        inset 0 6px 10px rgba(255, 255, 255, 0.3),
        inset 0 -8px 12px rgba(0, 0, 0, 0.4),
        0 8px 10px rgba(0, 0, 0, 0.7); /* Changed from 15px to 10px for consistency */

}



/* Copying .wood-texture-active properties to .wood-button:active for pure CSS */
.wood-button:active {
    box-shadow: inset 0 2px 2px rgba(0, 0, 0, 0.7);
    /* transform: translateY(2px) ease .5s; */
    color:white;
}

/* Wood Button (Round) - cart icon / user icon */
.wood-button-round, .user_button { /* Combined for shared styles */
    width: 45px;
    height: 45px;
    border-radius: 50%;    transform: translateY(2px) ease .5s;

    text-align: center;
    position: relative; /* Crucial for tooltips below */

    /* Base wood texture */
    background-image:
        repeating-linear-gradient(45deg, var(--wood-grain-dark), var(--wood-grain-dark) 1px, transparent 2px, transparent 5px),
        repeating-linear-gradient(-45deg, var(--wood-grain-light), var(--wood-grain-light) 1px, transparent 2px, transparent 5px),
        linear-gradient(90deg, var(--wood-base), var(--wood-highlight), var(--wood-base));
    
    /* Inherit shared styles */
}


/* Copying .wood-texture-base properties to .wood-button-round, .user_button for pure CSS */
.wood-button-round, .user_button {
    background-repeat: repeat, repeat, no-repeat;
    background-position: 0 0, 0 0, 0 0;
    background-size: auto, auto, cover;
    border: 3px solid var(--wood-shadow);
    box-shadow:
        inset 0 4px 8px rgba(255, 255, 255, 0.2),
        inset 0 -6px 8px rgba(0, 0, 0, 0.3),
        0 6px 10px rgba(0, 0, 0, 0.6);
    cursor: pointer;
    transition: background 0.3s ease, box-shadow 0.2s ease, transform 0.2s ease;
    user-select: none;
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.6);
}

/* Specific background images for individual round buttons */
.wood-button-round {
    background-image: url('images/cart_ico.png'), /* Icon */
                      repeating-linear-gradient(45deg, var(--wood-grain-dark), var(--wood-grain-dark) 1px, transparent 2px, transparent 5px),
                      repeating-linear-gradient(-45deg, var(--wood-grain-light), var(--wood-grain-light) 1px, transparent 2px, transparent 5px),
                      linear-gradient(90deg, var(--wood-base), var(--wood-highlight), var(--wood-base));
    background-size: 95%, auto, auto, cover; /* Icon size */
    background-position: center center, 0 0, 0 0, 0 0; /* Icon position */
}

.user_button {
    background-image: url('images/userlogged.png'), /* Icon */
                      repeating-linear-gradient(45deg, var(--wood-grain-dark), var(--wood-grain-dark) 1px, transparent 2px, transparent 5px),
                      repeating-linear-gradient(-45deg, var(--wood-grain-light), var(--wood-grain-light) 1px, transparent 2px, transparent 5px),
                      linear-gradient(90deg, var(--wood-base), var(--wood-highlight), var(--wood-base));
    background-size: 95%, auto, auto, cover; /* Icon size */
    background-position: center center, 0 0, 0 0, 0 0; /* Icon position */
}



/* Copying .wood-texture-hover-active properties to .wood-button-round:hover, .user_button:hover for pure CSS */
.wood-button-round:hover, .user_button:hover {
    box-shadow:
        inset 0 6px 10px rgba(255, 255, 255, 0.3),
        inset 0 -8px 12px rgba(0, 0, 0, 0.4),
        0 8px 10px rgba(0, 0, 0, 0.7); /* Consistent shadow */
}



/* Copying .wood-texture-active properties to .wood-button-round:active for pure CSS */
.wood-button-round:active {
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.304);
    transform: translateY(2px);
}

/* Specific rounded button */
.rounded_btn {
    border-radius: 50%;
    width: 30px; /* This seems to be a general utility, not directly part of wood buttons */
}


/* Cart count */
.cart_count {
    text-decoration: none;
    font-size: small;
    border-radius: 50%;
    color: white;
    background-color: red;
    width: 20px;
    height: 20px;
    position: relative;
    bottom: 8px;
    left: 25px;
    z-index: 1; /* Ensure it's above the tooltip if they overlap */
}

/* --- TOOLTIP STYLES --- */
/* Base tooltip appearance - shared */
.cart-tooltip,
.account-tooltip {
    position: absolute; /* Relative to their respective parent .wood-button-round or .user_button */
    background-color: #333;
    color: #000000;
    padding: 8px 12px;
    border-radius: 5px;
    font-size: 0.9em;
    white-space: nowrap;
    opacity: 0;
    /* visibility: hidden; */
    /* transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s ease; */
    z-index: 1000; /* Ensure tooltips are always on top */
    position: relative;
    width: fit-content;
    margin-top: 5px; /* Add a small gap between the button and the tooltip */
    /* Styles for content layout within the tooltip */
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 5px;
    color:black;
    pointer-events: auto; /* Allows hovering/clicking on the tooltip content itself */
}

/* Specific Cart Tooltip Positioning */
/* The parent `<a>` tag for the cart icon needs position:relative for tooltip positioning */
.cart-link-wrapper {
    position: relative;
    display: inline-block; /* Helps with sizing and positioning */
}

.cart-tooltip {

    right: 250%; /* Position to the left of the wrapper */
    top:-3%;
    transform: translate(10px, -50%); /* Initial position for slide-in from right (10px offset) */
    pointer-events: none; /* Allow clicks to pass through */
}

.cart-link-wrapper:hover .cart-tooltip {
    opacity: 1;
    visibility: visible;
    transform: translate(-5px, -50%); /* End position for slide-in (5px offset) */
    color:white;
}





.account-tooltip hr {
    width: 80%;
    border: none;
    border-left: 1px solid #555;
    margin: 5px 0;
}

.account-tooltip .logout-button {
    color:white;
    text-decoration: none;
    padding: 5px 10px;
    border: 1px solid #555;
    border-radius: 3px;
    background-color: #555;
    transition: background-color 0.2s ease, border-color 0.2s ease;
    font-size: 0.9em;
}
.logout-button {color:white;}

.account-tooltip .logout-button:hover {
    border-color: #777;
}

/* Show account tooltip when .user_button is hovered */
.user_button:hover .account-tooltip {
    color:black;
    position: relative;
    top:-8px;
    left:-8px;
    opacity: 1;
    visibility: visible;
}
.user_button:hover{
    visibility: hidden;
}


/* Product Container Styles */
.products_container {
    min-height: 89vh;
    background-image: url("images/allbg2.jpg");
    background-size: cover;
    background-repeat: no-repeat;
    background-attachment: fixed;
    width: 100%;
    display: flex;
    justify-content: flex-start;
    align-items: center;
    flex-wrap: wrap;
    z-index: -1;
}

.prod_container {
    background-color: black;
    opacity: .8;
    padding: 5px;
    margin: 10px;
    box-shadow: 2px 2px 5px 2px rgb(0, 0, 0);
    width: 200px;
    height: 300px;
    border-radius: 5%;
    display: flex;
    justify-content: flex-start;
    align-items: flex-start;
    flex-direction: column;
    color: black;
    transition: transform .5s ease;
}

.prod_container a {
    text-decoration: none;
    color: black;
}

.prod_container:hover {
    transform: scale(110%);
    transition: .5s ease;
}

.prod_container img {
    border-radius: 5px;
    margin: 2px 0;
    width: 100%;
    height: 50%;
}

.prod_name {
    color:white;
    text-align: center;
    font-size: large;
    margin-top: 0;
    border-bottom:1px solid rgb(255, 255, 255);
    border-start-start-radius: 5px; /* This is an older, non-standard property. Use border-top-left-radius. */
    border-top-left-radius: 5px; /* Modern equivalent */
    padding: 5px;
    color: rgb(255, 255, 255);
    width: 100%;
    height: 25%;
    background-color: rgb(0, 0, 0);
    border-radius: 5px; /* This will overwrite the specific top-left if applied after */
    margin-bottom: 2px;
    
}

.prod_btn_lst {
    border: #8b5e3c 2px solid;
    padding: 5px;
    background-color: red;
    border-radius: 1rem;
    color: white;
}

.lower_parts {
    padding-top: 7px;
    align-self: center;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

h4 {
    color: white;
}


/* Footer */
footer {
    font-weight: 650;
    color: black;
    z-index: 5;
    /* box-shadow: 0 -10px 15px 10px rgba(0, 0, 0, 0.5); Corrected box-shadow direction and spread */
    padding: 20px;
    background: linear-gradient(to top, 
    #e3b47e 95%,
    rgb(0, 0, 0) 100%);


}


footer a {
    color: black;
    text-decoration: dashed;
}

footer h3 {
    margin-bottom: 10px;
}

footer div {
    margin-bottom: 15px;
}

footer .footer-links {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
}

footer .footer-bottom {
    text-align: center;
    margin-top: 10px;
}

/* Wood Background (Utility or specific element) */
.wood_background {
    z-index: -2; /* Ensure it's behind content */
    display: inline-block;
    font-size: 1rem;
    font-weight: 700;
    color: #1c1c1c; /* Changed from #f2d775 */
    height: 50px;
    width: 15%;
    text-align: center;
    display: flex;
    justify-content: center;
    align-items: center;
    
    /* Specific grain for background */
    background-image:
        repeating-linear-gradient(45deg, var(--wood-grain-dark-bg), var(--wood-grain-dark-bg) 1px, transparent 2px, transparent 5px),
        repeating-linear-gradient(-45deg, var(--wood-grain-light-bg), var(--wood-grain-light-bg) 1px, transparent 2px, transparent 5px),
        linear-gradient(90deg, var(--wood-base), var(--wood-highlight), var(--wood-base));

    /* Inherit shared styles */

}

/* Copying .wood-texture-base properties to .wood_background for pure CSS */
.wood_background {
    background-repeat: repeat, repeat, no-repeat;
    background-position: 0 0, 0 0, 0 0;
    background-size: auto, auto, cover;
    border: 3px solid var(--wood-shadow);
    box-shadow:
        inset 0 4px 8px rgba(255, 255, 255, 0.2),
        inset 0 -6px 8px rgba(0, 0, 0, 0.3),
        0 6px 10px rgba(0, 0, 0, 0.6);
    cursor: pointer;
    transition: background 0.3s ease, box-shadow 0.2s ease, transform 0.2s ease;
    user-select: none;
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.6);
}

.wood_background:hover { /* This .wood-button:hover was incorrect for wood_background */
    background-image:
        repeating-linear-gradient(45deg, var(--wood-grain-dark-bg), var(--wood-grain-dark-bg) 1px, transparent 2px, transparent 5px),
        repeating-linear-gradient(-45deg, var(--wood-grain-light-bg), var(--wood-grain-light-bg) 1px, transparent 2px, transparent 5px),
        linear-gradient(90deg, #a3744c, #c1a17d, #a3744c);
    
    /* Inherit shared hover/active styles */

}
/* Copying .wood-texture-hover-active properties to .wood_background:hover for pure CSS */
.wood_background:hover {
    box-shadow:
        inset 0 6px 10px rgba(255, 255, 255, 0.3),
        inset 0 -8px 12px rgba(0, 0, 0, 0.4),
        0 8px 15px rgba(0, 0, 0, 0.7);
}


/* Animations */
@keyframes cartBounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.cart-animate {
    animation: cartBounce 0.6s ease-in-out;
}


/* Scroll to Top Button */
#scrollTopBtn {

    background-image: 
                      repeating-linear-gradient(45deg, var(--wood-grain-dark), var(--wood-grain-dark) 1px, transparent 2px, transparent 5px),
                      repeating-linear-gradient(-45deg, var(--wood-grain-light), var(--wood-grain-light) 1px, transparent 2px, transparent 5px),
                      linear-gradient(90deg, var(--wood-base), var(--wood-highlight), var(--wood-base));
    background-size: 95%, auto, auto, cover; /* Icon size */
    background-position: center center, 0 0, 0 0, 0 0; /* Icon position */
    width: 50px;
    height: 50px;
    font-family:Impact, Haettenschweiler, 'Arial Narrow Bold', sans-serif;
    display: none;
    position: fixed;
    bottom: 40px;
    right: 30px;
    z-index: 100;
    font-size: 30px;
    font-weight: 800;
    color: #352805;
    border-radius: 50%;
    display: flex;
    padding-bottom: 10px;
    justify-content: center;
    align-items: center;
    border:3px solid #382614;
    cursor: pointer;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.4);
    transition: background-color 0.3s ease, box-shadow 0.3s ease; /* Added transition for smooth hover */
}

#scrollTopBtn:hover {

    color:white;
    background-color: #a67853;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.5); /* Slightly larger shadow on hover */
}


/* Mobile Menu (Media Query) */
.menu-toggle {
    display: none; /* Hidden by default, shown in media query */
    width: 50px;
    color: black; /* Set initial color */
}

@media (max-width: 480px) {
    .logo-container {
        display: none;
    }
    .body {
        min-height: 1000px;
        background: none;
    }
    .fixed-bg {
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url("images/phone_bg.JPG");
    background-size: cover;       /* Ensures full coverage */
    background-repeat: no-repeat;
    background-position: center;
    z-index: -1;                  /* Push behind content */
    }
    .menu-toggle {
        display: block;
    }

    .wood-button {
        height: 40px;
        font-size: 3.5vw; /* Keep relative font size */
    }

    .wood-button-round {
        width: 40px;
        height: 40px;
        background-size: 100%;
    }

    .cart_count {
        width: 16px;
        height: 16px;
        font-size: 10px;
        left: 22px;
        bottom: 6px;
    }

    .nav-links {
        display: none;
        position: absolute;
        top: 100px;
        right: 120px;
        background-color: rgba(0, 0, 0, 0.874);
        flex-direction: column;
        gap: 10px;
        padding: 10px;
        border-radius: 8px;
        z-index: 10;
        box-shadow: none;
        width: 150px;
        align-items: center;
        height: 220px;
    }

    .nav-links.show {
        display: flex;
    }

    .nav-links a.wood-button {
        background: none;
        color: white;
        box-shadow: none;
        border-bottom: 1px white; /* This will be a border of 1px solid white */
        border-radius: 5px;
        width: 100%;
        text-align: center;
        padding: 10px 0;
        font-size: 1rem;
    }

    .nav-links a.wood-button:hover {
        background-color: rgba(255, 255, 255, 0.1);
        color: white;
    }

    /* .user_button {
        display: block;
    } */

    .products_container {
        background-size: cover;
        background-attachment: scroll;
        min-height: 100vh;

    }

    .account-tooltip {
        width: fit-content;
    }
    .user_button:hover .account-tooltip {
    position: relative;
    top:-15px;
    left:-12px;
    opacity: 1;
    visibility: visible;
    border-color: #a3744c;
    width: 50px;
    height: 70px;
    border:1px;
    display: flex;
    flex-direction: column;
    padding:10px;
    font-size: 12px;
    overflow: auto;

}

.logout-button {
    height: auto;
    width: fit-content;
    background-color: black;
}
.cart-tooltip {
    left:-100px;
    transform: translate(-60px, -50%);
}
}
