/* styles.css */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Indie+Flower&display=swap');

body {
    background: 
        linear-gradient(135deg, #e0f7fa 25%, #f0f8ff 25%, #f0f8ff 50%, #e0f7fa 50%, #e0f7fa 75%, #f0f8ff 75%, #f0f8ff), 
        url('images/cardboard.png');
    background-size: 56.57px 56.57px, auto;
    color: #3E3E3E;
    font-family: 'Montserrat', sans-serif;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    height: 100vh;
    justify-content: space-between;
    backdrop-filter: blur(10px) brightness(0.2);
    transition: backdrop-filter .4s ease-in-out;
}

.header, .footer, .lid-bottom {
    background-image: url('images/cardboard.png');
    background-color: #0288D1;
    padding: 20px;
    text-align: center;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    flex-shrink: 0;
    position: relative;
    width: calc(100% - 40px);
    transition: height .3s ease;
}

.header {
    height: 55px;
}

footer {
    cursor: pointer;
}

.header::before, .footer::before, .lid::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 15px;
    background: url('images/cardboard-edge.jpg') repeat-x;
    background-size: auto 15px;
    left: 0;
    z-index: 1;
}

.header::before {
    top: 100%;
    transform: rotate(180deg);
}

.footer::before {
    bottom: 100%;
}

.lid::before {
    top: 100%;
    transform: rotateX(-90deg) translateY(-2px);
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
}

.header h1, .footer p, .lid-bottom h1 {
    margin: 0;
    color: aliceblue;
    font-size: 2.5em;
    font-family: 'Indie Flower', cursive;
}

.header nav a, .footer nav a, .lid-bottom nav a {
    margin: 0 15px;
    color: #3E3E3E;
    text-decoration: none;
    font-weight: bold;
    font-size: 1.2em;
    transition: color 0.3s ease;
}

.header nav a:hover, .footer nav a:hover, .lid-bottom nav a:hover {
    color: #0277BD;
}

hero {
    width: calc(100% + 80px);
    margin-inline: -20px;
    height: 70vh;
    background: url(images/ice-cream.jpg);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background-attachment: fixed;
    background-repeat: no-repeat;
    background-size: cover;
    box-shadow: inset 0 0 15px 10px rgba(0, 0, 0, .4);
}

.content {
    position: relative;
    height: 100%;
    overflow-x: hidden;
    overflow-y: overlay;
    scale: .8;
    filter: blur(10px) brightness(.2);
    transition: scale .5s ease-in-out, filter .5s ease-in-out;
}

/*.content::-webkit-scrollbar {
  width: 10px;
  margin-left: -10px;
}
 
.content::-webkit-scrollbar-track {
  box-shadow: none;
  background: transparent;
}
 
.content::-webkit-scrollbar-thumb {
  background-color: pink;
  outline: 1px solid deeppink;
  border-radius: 10px;
}*/

.main-content {
    text-align: center;
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    border: 2px solid #8da389;
    max-width: 1200px;
    margin: 20px auto;
    padding: 40px;
    min-height: calc(100% - 128px);
}

h2 {
    color: #0277BD;
    font-size: 2.5em;
    margin-bottom: 20px;
    font-family: 'Indie Flower', cursive;
}

hero h2 {
    color: #0277BD;
    font-size: 2.5em;
    margin-bottom: 20px;
    font-family: 'Indie Flower', cursive;
    background: aliceblue;
    padding: 30px;
    border: solid 2px;
    border-radius: 15px;
    transform: rotate(-5deg);
    box-shadow: 0 2px 3px 2px rgba(0, 0, 0, .5);
}

hero h2::after {
    content: attr(data-tagline);
    padding-top: 10px;
    padding-bottom: 18px;
    padding-left: 40px;
    padding-right: 65px;
    border: 1px solid #ccc;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    font-size: 1.2em;
    color: #333;
    margin: 30px 0;
    background-image: linear-gradient(to right, transparent 20px, #ff0000 21px, transparent 21px, transparent calc(100% - 41px), #ff0000 calc(100% - 40px), transparent calc(100% - 40px)), repeating-linear-gradient(white, white 24px, #add8e6 25px);
    background-color: white;
    border-radius: 1px;
    transform: rotate(-10deg) rotate(15deg);
    margin-inline: auto;
    display: block;
    position: absolute;
    right: 0;
    white-space: nowrap;
    font-size: 1.3rem;
    margin-top: 10px;
}

.product, .testimonial {
    border: 2px solid #0288D1;
    border-radius: 10px;
    padding: 20px;
    margin: 20px;
    width: 80%;
    max-width: 300px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    background-color: white;
}

.products {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    justify-content: center;
}

.product {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: stretch;
}

.product img {
    width: 100%;
    border-radius: 10px;
    margin-bottom: 10px;
}

.btn-buy {
    background: linear-gradient(to right, #0288D1, #B3E5FC);
    color: white;
    border: none;
    padding: 10px 20px;
    cursor: pointer;
    border-radius: 5px;
    transition: background 0.3s ease;
    font-family: 'Indie Flower', cursive;
}

.btn-buy:hover {
    background: linear-gradient(to right, #01579B, #0288D1);
}

.main-content iframe {
    max-width: min(80vw, 1200px);
    width: 100vw;
    aspect-ratio: 6 / 3;
    border: none;
    border-radius: 20px;
}

.about-us, .testimonials {
    margin: 20px 0;
    padding: 20px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 10px;
    width: 80%;
    max-width: 800px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    border: 2px solid #8da389;
}

div#testimonials-content {
    display: flex;
    flex-wrap: wrap;
    flex-direction: row;
    justify-content: center;
    align-items: stretch;
    width: 100%;
}

.testimonial {
    width: 100%;
    background-image: linear-gradient(to right, transparent 20px, #ff0000 21px, transparent 21px, transparent calc(100% - 41px), #ff0000 calc(100% - 40px), transparent calc(100% - 40px)), repeating-linear-gradient(white, white 24px, #add8e6 25px);
    padding: 10px 20px 20px 40px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    flex-wrap: nowrap;
}

.testimonial p {
    font-family: 'Indie Flower', cursive;
    font-size: 25px;
    text-align: justify;
    hyphens: auto;
    color: #0277BD;
    padding-right: 40px;
    line-height: 25px;
    font-size: 20px;
}

.testimonial p:nth-of-type(2) {
    color: #333;
    padding-top: 5px;
    text-align: right;
}

footer p {
    font-size: 1.2em;
}

.lid-container {
    position: absolute;
    top: 0px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    z-index: 100;
    width: 100vw;
    bottom: 4px;
    perspective: 3000px;
    overflow: hidden;
    pointer-events: none;
}

.lid-container footer {
    pointer-events: all;
}

.lid {
    position: relative;
    width: 100%;
    top: 0;
    bottom: 0;
    height: 100%;
    background: #0288D1;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transform-origin: top;
    transform-style: preserve-3d;
    transition: transform 1s;
    z-index: 5;
    pointer-events: all;
}

.lid-top {
    position: absolute;
    width: 100%;
    height: 100%;
    background-image: url(images/cardboard.png);
    background-color: #0288D1;
    background-size: 40%;
    border: 2px solid #8da389;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    text-align: center;
    overflow: hidden;
}

.lid-bottom {
    position: absolute;
    height: 100%;
    background-image: url('images/cardboard.png');
    background-color: #AD8762;
    background-size: 40%;
    border: 2px solid #8da389;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    transform: rotateX(180deg);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    transform-style: preserve-3d;
    filter: blur(10px) brightness(0.2);
    transition: filter .5s ease-in-out;
    box-sizing: border-box;
    width: 100%;
}

.sticker {
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.sticker img {
    max-height: 50vh;
    max-width: 95vw;
    -webkit-filter: drop-shadow(2px 2px 2px #222);
    filter: drop-shadow(2px 2px 2px #222);
}

.sticker::before {
    content: "Here is a little box of love~";
    position: absolute;
    transform: translate(10vw, -25vh) rotate(15deg);
    font-size: min(3rem, 3vh);
    color: aliceblue;
    font-family: 'Indie Flower', cursive;
}

.open-here {
    font-family: 'Indie Flower', cursive;
    font-size: 2em;
    color: aliceblue;
    border: dashed 3px #8da389;
    border-radius: 1000px;
    padding: 50px;
    aspect-ratio: 1 / 1;
    width: fit-content;
    margin: auto;
    margin-top: -120px;
    cursor: pointer;
    user-select: none;
}

.notebook-note {
    width: 300px;
    padding-top: 20px;
    padding-bottom: 50px;
    padding-left: 25px;
    padding-right: 45px;
    border: 1px solid #ccc;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    position: relative;
    font-size: 1.2em;
    color: #333;
    margin: 30px 0;
    background-image: linear-gradient(
        to right,
        transparent 20px,
        #ff0000 21px,
        transparent 21px,
        transparent calc(100% - 41px),
        #ff0000 calc(100% - 40px),
        transparent calc(100% - 40px)
    ), repeating-linear-gradient(
        white,
        white 24px,
        #add8e6 25px
    );
    background-color: white;
    border-radius: 1px;
    transform: rotate(-10deg);
    z-index: 200;
    margin-inline: auto;
    top: 10%;
}

.notebook-note p {
    margin: 0;
    line-height: 25px;
    text-align: justify;
    margin-top: 8px;
    font-family: 'Indie Flower', cursive;
}

.about-us.notebook-note {
    top: 10%;
    text-align: left;
    width: 40%;
    scale: 1.2;
    transform: rotate(-4deg);
}

nav {
    bottom: -64px;
    transition: all .3s ease-in-out;
    padding-top: 20px;
    padding-bottom: 50px;
    padding-left: 25px;
    padding-right: 45px;
    border: 1px solid #ccc;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    position: relative;
    font-size: 1.2em;
    color: #333;
    margin: 30px 0;
    background-image: linear-gradient(to right, transparent 20px, #ff0000 21px, transparent 21px, transparent calc(100% - 41px), #ff0000 calc(100% - 40px), transparent calc(100% - 40px)), repeating-linear-gradient(white, white 24px, #add8e6 25px);
    background-color: white;
    border-radius: 1px;
    transform: translate(-20px, 10px) rotate(2deg);
    font-family: 'Indie Flower', cursive;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    justify-content: flex-start;
    align-items: flex-start;
    margin-inline: auto;
    height: 0px;
    box-shadow: 2px 4px 3px 1px rgba(0, 0, 0, .4);
}

nav img {
    display: block;
    position: absolute;
    height: 70px;
    right: -32px;
    top: -16px;
    pointer-events: none;
}

nav img:nth-of-type(2) {
    display: block;
    position: absolute;
    height: 70px;
    left: -32px;
    top: -16px;
    rotate: -73deg;
    pointer-events: none;
}

nav #menu-toggle {
    display: none;
}

.cast {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: flex-start;
}

.cast:nth-of-type(even) {
    flex-direction: row-reverse;
}

.cast img {
    height: 200px;
    width: 200px;
    display: block;
    border-radius: 40px;
}

.cast-details {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    padding-left: 30px;
}

.cast:nth-of-type(even) .cast-details {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: center;
    padding-right: 30px;
}

.cast .cast-details h2,
.cast .cast-details p {
    margin: 0;
}

.cast .cast-details p {
    text-align: left;
}

.cast:nth-of-type(even) .cast-details p {
    text-align: right;
}

/* Cart Icon */
.cart-icon {
    position: fixed;
    width: 40px;
    height: 40px;
    cursor: pointer;
    background: white;
    padding: 5px;
    border-radius: 50%;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    top: 100px;
    right: 40px;
    display: none;
}

.cart-icon i {
    font-size: 2em;
    color: #0288D1;
}

.cart-icon .badge {
    position: absolute;
    top: -10px;
    right: -10px;
    background: red;
    color: white;
    border-radius: 50%;
    padding: 5px;
    font-size: 12px;
    min-width: 20px;
    min-height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Cart Modal */
.cart-modal, .checkout-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.cart-content, .checkout-content {
    background: white;
    position: relative;
    padding: 20px;
    border-radius: 10px;
    width: 80%;
    max-width: 500px;
    text-align: center;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.cart-content h2, .checkout-content h2 {
    margin-top: 0;
    font-family: 'Indie Flower', cursive;
    color: #0288D1;
}

/* Close Button */
.modal-close {
    position: absolute;
    top: 10px;
    right: 10px;
    background: none;
    border: none;
    font-size: 1.5em;
    cursor: pointer;
    color: #0288D1;
    transition: color 0.3s ease;
}

.modal-close:hover {
    color: #01579B;
}

#cart-items {
    margin-inline: -20px;
    max-height: 450px;
    overflow: overlay;
}

#cart-items::-webkit-scrollbar {
  width: 10px;
  margin-left: -10px;
}
 
#cart-items::-webkit-scrollbar-track {
  box-shadow: none;
  background: transparent;
}
 
#cart-items::-webkit-scrollbar-thumb {
  background-color: pink;
  outline: 1px solid deeppink;
  border-radius: 10px;
}

/* Cart Item with Background Image */
.cart-item {
    display: flex;
    justify-content: space-between;
    align-items: stretch;
    margin-bottom: 10px;
    border-bottom: 1px solid #ccc;
    padding: 10px;
    position: relative;
    background-size: cover;
    background-position: center;
    color: white;
    text-shadow: 0 0 5px rgba(0, 0, 0, 0.7);
}

.cart-item span {
    font-family: 'Indie Flower', cursive;
    font-size: 1.2em;
    background: rgba(0, 0, 0, 0.5);
    padding: 5px 10px;
    border-radius: 5px;
}

.cart-item input, .cart-item button {
    background: rgba(0, 0, 0, 0.5);
    border: none;
    padding: 5px 10px;
    color: white;
    border-radius: 5px;
}

.cart-item input {
    width: 50px;
    text-align: center;
    font-family: 'Montserrat', sans-serif;
}

.cart-item button {
    cursor: pointer;
    transition: background 0.3s ease;
}

.cart-item button:hover {
    background: rgba(255, 0, 0, 0.7);
}

#checkout-btn, .checkout-content button[type="submit"] {
    background: linear-gradient(to right, #0288D1, #B3E5FC);
    color: white;
    border: none;
    padding: 10px 20px;
    cursor: pointer;
    border-radius: 5px;
    transition: background 0.3s ease;
    font-family: 'Indie Flower', cursive;
    margin-top: 20px;
    width: 100%;
}

#checkout-btn:hover, .checkout-content button[type="submit"]:hover {
    background: linear-gradient(to right, #01579B, #0288D1);
}

/* Checkout Modal */
.checkout-content label {
    display: block;
    margin-top: 10px;
    font-family: 'Indie Flower', cursive;
    font-size: 1.2em;
    color: #0288D1;
}

.checkout-content input, .checkout-content textarea {
    width: calc(100% - 20px);
    padding: 10px;
    margin-top: 5px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-family: 'Montserrat', sans-serif;
}

@media screen and (max-width: 900px) {
    .header, .footer {
        height: 0;
        padding: 0;
        margin: 0;
        font-size: 0;
        width: 100vw;
    }
    
    .main-content {
        width: 70vw;
        font-size: .8rem;
    }
    
    nav {
        bottom: -64px;
        transition: all .3s ease-in-out;
        padding-top: 20px;
        padding-bottom: 50px;
        padding-left: 25px;
        padding-right: 45px;
        border: 1px solid #ccc;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
        position: relative;
        font-size: 1.2em;
        color: #333;
        margin: 30px 0;
        background-image: linear-gradient(to right, transparent 20px, #ff0000 21px, transparent 21px, transparent calc(100% - 41px), #ff0000 calc(100% - 40px), transparent calc(100% - 40px)), repeating-linear-gradient(white, white 24px, #add8e6 25px);
        background-color: white;
        border-radius: 1px;
        transform: translate(-20px, 0);
        font-family: 'Indie Flower', cursive;
        -webkit-backface-visibility: hidden;
        backface-visibility: hidden;
        display: flex;
        flex-direction: column;
        flex-wrap: nowrap;
        justify-content: flex-start;
        align-items: flex-start;
        margin-inline: auto;
        height: auto;
    }
    
    nav.open {
        transform: translate(-20px, 95%) rotate(-10deg);
    }
    
    nav #menu-toggle {
        position: absolute;
        bottom: 0;
        width: 100%;
        left: -10px;
        font-weight: 900;
        display: block;
    }
    
    nav img {
        display: block;
        position: absolute;
        height: 70px;
        right: 50px;
        top: -34px;
        pointer-events: none;
    }
    
    nav img:nth-of-type(2) {
        display: none;
    }
    
    .cast, .cast:nth-of-type(even) {
        width: 100%;
        display: flex;
        align-items: center;
        justify-content: flex-start;
        flex-direction: column;
        margin-bottom: 20px;
    }
    
    .cast .cast-details,
    .cast:nth-of-type(even) .cast-details {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        padding: 0;
        line-height: unset;
        font-size: 0.5rem;
        margin: 0;
    }
    
    .cast .cast-details p,
    .cast:nth-of-type(even) .cast-details p {
        font-size: .8rem;
        text-align: center;
    }
    
    .main-content iframe {
        max-width: 240vw;
        width: 240vw;
        aspect-ratio: 6 / 7;
        border: none;
        border-radius: 20px;
        scale: .33333;
        margin: -90vw;
    }
}
