/* ============================================
   RAKEDUIWAQPLAY - Premium Candy Shop Styles
   ============================================ */

:root {
    --primary-pink: #FFB6C1;
    --soft-pink: #FFD9E3;
    --beige: #F5E6D3;
    --cocoa: #8B6F47;
    --dark-cocoa: #5D4A2F;
    --cream: #FFF8F0;
    --white: #FFFFFF;
    --text-dark: #2C2C2C;
    --text-light: #666666;
    --shadow-soft: 0 4px 15px rgba(139, 111, 71, 0.1);
    --shadow-hover: 0 8px 25px rgba(139, 111, 71, 0.2);
    --gradient-sweet: linear-gradient(135deg, #FFB6C1 0%, #FFD9E3 50%, #F5E6D3 100%);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: var(--text-dark);
    background: var(--cream);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Prevent text size adjustment on orientation change */
* {
    -webkit-text-size-adjust: 100%;
    -moz-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

/* ============================================
   HEADER & NAVIGATION
   ============================================ */

header {
    background: var(--white);
    box-shadow: var(--shadow-soft);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 1rem 0;
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.logo {
    font-size: 1.8rem;
    font-weight: bold;
    background: var(--gradient-sweet);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-decoration: none;
    letter-spacing: -0.5px;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
}

nav ul li a {
    color: var(--text-dark);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
}

nav ul li a:hover {
    color: var(--cocoa);
}

nav ul li a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-pink);
    transition: width 0.3s ease;
}

nav ul li a:hover::after {
    width: 100%;
}

.cart-icon {
    position: relative;
    font-size: 1.5rem;
    color: var(--cocoa);
    text-decoration: none;
}

.cart-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: var(--primary-pink);
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--cocoa);
    cursor: pointer;
    padding: 0.5rem;
    transition: transform 0.3s ease;
}

.mobile-menu-toggle:active {
    transform: scale(0.9);
}

/* ============================================
   HERO SECTION
   ============================================ */

.hero {
    background: var(--gradient-sweet);
    padding: 4rem 20px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 300px;
    height: 300px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    z-index: 0;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.hero h1 {
    font-size: 3rem;
    color: var(--dark-cocoa);
    margin-bottom: 1rem;
    font-weight: 700;
}

.hero p {
    font-size: 1.2rem;
    color: var(--text-dark);
    margin-bottom: 2rem;
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 15px 40px;
    background: var(--cocoa);
    color: white;
    text-decoration: none;
    border-radius: 30px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-soft);
    min-height: 44px; /* Minimum touch target size */
    cursor: pointer;
    border: none;
}

.btn-primary:hover {
    background: var(--dark-cocoa);
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.btn-primary:active {
    transform: translateY(0);
}

/* ============================================
   MAIN CONTENT
   ============================================ */

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 3rem 20px;
}

.section-title {
    font-size: 2.5rem;
    color: var(--dark-cocoa);
    margin-bottom: 2rem;
    text-align: center;
    position: relative;
    padding-bottom: 1rem;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background: var(--gradient-sweet);
    border-radius: 2px;
}

/* ============================================
   PRODUCT CARDS
   ============================================ */

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.product-card {
    background: var(--white);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow-soft);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.product-image {
    width: 100%;
    height: 250px;
    background: var(--gradient-sweet);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
    display: block;
}

/* Only apply hover effect on non-touch devices */
@media (hover: hover) {
    .product-card:hover .product-image img {
        transform: scale(1.05);
    }
}

/* Optimize images for mobile */
.product-image img {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

.product-info {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.product-category {
    font-size: 0.85rem;
    color: var(--cocoa);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.5rem;
}

.product-name {
    font-size: 1.4rem;
    color: var(--dark-cocoa);
    margin-bottom: 0.75rem;
    font-weight: 600;
}

.product-description {
    color: var(--text-light);
    font-size: 0.95rem;
    margin-bottom: 1rem;
    flex-grow: 1;
    line-height: 1.6;
}

.product-ingredients {
    font-size: 0.85rem;
    color: var(--text-light);
    font-style: italic;
    margin-bottom: 1rem;
    padding-top: 0.5rem;
    border-top: 1px solid var(--beige);
}

.product-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
}

.product-price {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--cocoa);
}

.btn-add-cart {
    padding: 10px 20px;
    background: var(--primary-pink);
    color: white;
    border: none;
    border-radius: 25px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.95rem;
    min-height: 44px; /* Minimum touch target size */
    touch-action: manipulation; /* Prevents double-tap zoom on mobile */
}

.btn-add-cart:hover {
    background: var(--cocoa);
    transform: scale(1.05);
}

.btn-add-cart:active {
    transform: scale(0.95);
}

/* ============================================
   CONTENT SECTIONS
   ============================================ */

.content-section {
    background: var(--white);
    border-radius: 20px;
    padding: 3rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-soft);
}

.content-section h2 {
    color: var(--dark-cocoa);
    margin-bottom: 1.5rem;
    font-size: 2rem;
}

.content-section p {
    color: var(--text-dark);
    margin-bottom: 1rem;
    line-height: 1.8;
}

.content-section ul {
    margin-left: 2rem;
    margin-bottom: 1rem;
}

.content-section li {
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

/* ============================================
   FORM STYLES
   ============================================ */

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--dark-cocoa);
    font-weight: 600;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px;
    border: 2px solid var(--beige);
    border-radius: 10px;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-pink);
}

.form-group textarea {
    min-height: 120px;
    resize: vertical;
}

.btn-submit {
    padding: 15px 40px;
    background: var(--cocoa);
    color: white;
    border: none;
    border-radius: 30px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
}

.btn-submit:hover {
    background: var(--dark-cocoa);
    transform: translateY(-2px);
}

/* ============================================
   CART PAGE
   ============================================ */

.cart-item {
    background: var(--white);
    border-radius: 15px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow-soft);
    flex-wrap: wrap;
    gap: 1rem;
}

.cart-item-info {
    flex: 1;
    min-width: 200px;
}

.cart-item-name {
    font-size: 1.2rem;
    color: var(--dark-cocoa);
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.cart-item-price {
    color: var(--cocoa);
    font-weight: 600;
}

.cart-item-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.quantity-control {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.quantity-btn {
    width: 35px;
    height: 35px;
    min-width: 44px; /* Minimum touch target */
    min-height: 44px;
    border: 2px solid var(--beige);
    background: white;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    touch-action: manipulation;
}

.quantity-btn:hover {
    border-color: var(--primary-pink);
    background: var(--soft-pink);
}

.quantity-btn:active {
    transform: scale(0.9);
}

.quantity-value {
    min-width: 40px;
    text-align: center;
    font-weight: 600;
}

.btn-remove {
    padding: 8px 15px;
    background: #ff6b6b;
    color: white;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.btn-remove:hover {
    background: #ff5252;
}

.cart-summary {
    background: var(--white);
    border-radius: 20px;
    padding: 2rem;
    margin-top: 2rem;
    box-shadow: var(--shadow-soft);
}

.cart-total {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--dark-cocoa);
    margin-bottom: 1rem;
    text-align: right;
}

.empty-cart {
    text-align: center;
    padding: 4rem 20px;
    color: var(--text-light);
}

.empty-cart-icon {
    font-size: 5rem;
    margin-bottom: 1rem;
}

/* ============================================
   FOOTER
   ============================================ */

footer {
    background: var(--dark-cocoa);
    color: white;
    padding: 3rem 20px 1rem;
    margin-top: 4rem;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3 {
    margin-bottom: 1rem;
    color: var(--soft-pink);
}

.footer-section a {
    color: white;
    text-decoration: none;
    display: block;
    margin-bottom: 0.5rem;
    transition: color 0.3s ease;
}

.footer-section a:hover {
    color: var(--primary-pink);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.7);
}

/* ============================================
   COOKIE BANNER
   ============================================ */

.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--dark-cocoa);
    color: white;
    padding: 1.5rem 20px;
    box-shadow: 0 -4px 15px rgba(0, 0, 0, 0.2);
    z-index: 9999;
    display: none;
}

.cookie-banner.show {
    display: block;
}

.cookie-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.cookie-text {
    flex: 1;
    min-width: 250px;
}

.cookie-buttons {
    display: flex;
    gap: 1rem;
}

.btn-cookie {
    padding: 10px 20px;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-cookie-accept {
    background: var(--primary-pink);
    color: white;
}

.btn-cookie-accept:hover {
    background: var(--soft-pink);
}

.btn-cookie-decline {
    background: transparent;
    color: white;
    border: 2px solid white;
}

.btn-cookie-decline:hover {
    background: white;
    color: var(--dark-cocoa);
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

/* Tablet styles (768px - 1024px) */
@media (max-width: 1024px) {
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 1.5rem;
    }
    
    .container {
        padding: 2.5rem 20px;
    }
    
    .content-section {
        padding: 2.5rem;
    }
    
    .footer-container {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Mobile and small tablets (max-width: 768px) */
@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: block;
        font-size: 1.8rem;
        padding: 0.5rem;
        cursor: pointer;
        background: none;
        border: none;
        color: var(--cocoa);
    }

    .header-container {
        padding: 0.75rem 15px;
    }

    .logo {
        font-size: 1.5rem;
    }

    nav {
        width: 100%;
        display: none;
        order: 3;
        margin-top: 1rem;
        padding-top: 1rem;
        border-top: 1px solid var(--beige);
    }

    nav.show {
        display: block;
    }

    nav ul {
        flex-direction: column;
        gap: 0.75rem;
        padding: 0;
    }

    nav ul li {
        width: 100%;
    }

    nav ul li a {
        display: block;
        padding: 0.75rem 0;
        border-bottom: 1px solid var(--beige);
        font-size: 1rem;
    }

    nav ul li a::after {
        display: none;
    }

    .cart-icon {
        font-size: 1.3rem;
    }

    .hero {
        padding: 3rem 15px;
    }

    .hero h1 {
        font-size: 2rem;
        line-height: 1.2;
        margin-bottom: 0.75rem;
    }

    .hero p {
        font-size: 1rem;
        margin-bottom: 1.5rem;
    }

    .btn-primary {
        padding: 12px 30px;
        font-size: 0.95rem;
    }

    .section-title {
        font-size: 2rem;
        margin-bottom: 1.5rem;
    }

    .container {
        padding: 2rem 15px;
    }

    .products-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .product-card {
        max-width: 100%;
    }

    .product-image {
        height: 220px;
    }

    .product-name {
        font-size: 1.25rem;
    }

    .product-price {
        font-size: 1.3rem;
    }

    .btn-add-cart {
        padding: 10px 18px;
        font-size: 0.9rem;
    }

    .content-section {
        padding: 2rem 1.5rem;
        border-radius: 15px;
    }

    .content-section h2 {
        font-size: 1.75rem;
        margin-bottom: 1.25rem;
    }

    .cart-item {
        flex-direction: column;
        align-items: flex-start;
        padding: 1.25rem;
    }

    .cart-item-info {
        width: 100%;
        margin-bottom: 1rem;
    }

    .cart-item-controls {
        width: 100%;
        justify-content: space-between;
        flex-wrap: wrap;
        gap: 0.75rem;
    }

    .cart-item-name {
        font-size: 1.1rem;
    }

    .quantity-control {
        gap: 0.75rem;
    }

    .cart-summary {
        padding: 1.5rem;
    }

    .cart-total {
        font-size: 1.3rem;
    }

    .form-group {
        margin-bottom: 1.25rem;
    }

    .form-group input,
    .form-group textarea,
    .form-group select {
        padding: 10px;
        font-size: 16px; /* Prevents zoom on iOS */
    }

    .btn-submit {
        padding: 14px 30px;
        font-size: 1rem;
    }

    .footer-container {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        text-align: center;
    }

    .footer-section h3 {
        margin-bottom: 0.75rem;
    }

    .cookie-content {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }

    .cookie-text {
        width: 100%;
    }

    .cookie-text p {
        font-size: 0.9rem;
        line-height: 1.5;
    }

    .cookie-buttons {
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
    }

    .btn-cookie {
        padding: 10px 20px;
        font-size: 0.9rem;
    }

    /* Google Map responsive */
    iframe[title="Lage von rakeduiwaqplay"] {
        height: 300px !important;
        width: 100% !important;
    }
    
    /* Map container */
    div[style*="height: 400px"] {
        height: 300px !important;
    }
}

/* Small mobile devices (max-width: 480px) */
@media (max-width: 480px) {
    .header-container {
        padding: 0.5rem 10px;
    }

    .logo {
        font-size: 1.3rem;
    }

    .mobile-menu-toggle {
        font-size: 1.5rem;
    }

    .hero {
        padding: 2rem 10px;
    }

    .hero h1 {
        font-size: 1.75rem;
    }

    .hero p {
        font-size: 0.95rem;
    }

    .btn-primary {
        padding: 12px 25px;
        font-size: 0.9rem;
        width: 100%;
        max-width: 280px;
    }

    .container {
        padding: 1.5rem 10px;
    }

    .section-title {
        font-size: 1.75rem;
        padding-bottom: 0.75rem;
    }

    .section-title::after {
        width: 60px;
        height: 2px;
    }

    .product-card {
        border-radius: 15px;
    }

    .product-image {
        height: 200px;
    }

    .product-info {
        padding: 1.25rem;
    }

    .product-name {
        font-size: 1.15rem;
    }

    .product-description {
        font-size: 0.9rem;
    }

    .product-price {
        font-size: 1.2rem;
    }

    .btn-add-cart {
        padding: 9px 16px;
        font-size: 0.85rem;
        width: 100%;
        margin-top: 0.5rem;
    }

    .product-footer {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }

    .content-section {
        padding: 1.5rem 1rem;
        margin-bottom: 1.5rem;
    }

    .content-section h2 {
        font-size: 1.5rem;
    }

    .content-section p {
        font-size: 0.95rem;
    }

    .content-section ul {
        margin-left: 1.5rem;
    }

    .cart-item {
        padding: 1rem;
        border-radius: 12px;
    }

    .cart-item-name {
        font-size: 1rem;
    }

    .cart-item-price {
        font-size: 0.9rem;
    }

    .quantity-btn {
        width: 32px;
        height: 32px;
        font-size: 1rem;
    }

    .btn-remove {
        padding: 7px 12px;
        font-size: 0.85rem;
    }

    .cart-summary {
        padding: 1.25rem;
    }

    .cart-total {
        font-size: 1.2rem;
    }

    .form-group label {
        font-size: 0.95rem;
    }

    .form-group input,
    .form-group textarea,
    .form-group select {
        padding: 10px;
        font-size: 16px;
        border-radius: 8px;
    }

    .btn-submit {
        padding: 12px 25px;
    }

    .empty-cart {
        padding: 3rem 15px;
    }

    .empty-cart-icon {
        font-size: 4rem;
    }

    .empty-cart h2 {
        font-size: 1.5rem;
    }

    .footer-container {
        padding: 0 10px;
    }

    .footer-section {
        text-align: center;
    }

    .footer-bottom {
        padding-top: 1.5rem;
        font-size: 0.85rem;
    }

    .cookie-banner {
        padding: 1rem 10px;
    }

    .cookie-text p {
        font-size: 0.85rem;
    }

    /* Google Map for small screens */
    iframe[title="Lage von rakeduiwaqplay"] {
        height: 250px !important;
        width: 100% !important;
    }
    
    /* Map container for small screens */
    div[style*="height: 400px"] {
        height: 250px !important;
    }
}

/* Extra small devices (max-width: 360px) */
@media (max-width: 360px) {
    .logo {
        font-size: 1.2rem;
    }

    .hero h1 {
        font-size: 1.5rem;
    }

    .section-title {
        font-size: 1.5rem;
    }

    .product-name {
        font-size: 1.1rem;
    }

    .content-section h2 {
        font-size: 1.35rem;
    }
    
    .header-container {
        padding: 0.5rem 8px;
    }
    
    .container {
        padding: 1.25rem 8px;
    }
    
    .content-section {
        padding: 1.25rem 0.75rem;
    }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
    .hero {
        padding: 2rem 15px;
    }

    .hero h1 {
        font-size: 1.75rem;
    }

    .products-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .hero-content {
        max-width: 90%;
    }
}

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {
    /* Increase tap targets on touch devices */
    nav ul li a {
        padding: 0.75rem 0;
        min-height: 44px;
        display: flex;
        align-items: center;
    }
    
    .btn-remove {
        min-height: 44px;
        min-width: 44px;
    }
    
    /* Remove hover effects that don't work on touch */
    .product-card:hover {
        transform: none;
    }
    
    /* Better focus states for accessibility */
    button:focus,
    a:focus {
        outline: 3px solid var(--primary-pink);
        outline-offset: 2px;
    }
}

/* High DPI displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .product-image img {
        image-rendering: -webkit-optimize-contrast;
    }
}

/* ============================================
   ANIMATIONS
   ============================================ */

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

/* ============================================
   UTILITY CLASSES
   ============================================ */

.text-center {
    text-align: center;
}

.mb-2 {
    margin-bottom: 2rem;
}

.mt-2 {
    margin-top: 2rem;
}

.hidden {
    display: none !important;
}

.success-message {
    background: #4caf50;
    color: white;
    padding: 1rem;
    border-radius: 10px;
    margin-bottom: 1rem;
    text-align: center;
}

.error-message {
    background: #f44336;
    color: white;
    padding: 1rem;
    border-radius: 10px;
    margin-bottom: 1rem;
    text-align: center;
}

