/*
Theme Name: Farmacia Al Carso
Description: Tema WordPress per la Farmacia Al Carso di Trieste - Professionalità e attenzione alla persona
Version: 1.0
Author: Farmacia Al Carso
*/

/* Import the main CSS from assets template */
/*@import url("assets/sass/main.css");*/

/* Custom styles for pharmacy theme */
.pharmacy-hero {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.pharmacy-services .service-item {
    margin-bottom: 2rem;
}

.pharmacy-contact-info {
    background-color: #c5e2b2;
    padding: 2rem;
    border-radius: 8px;
    margin-bottom: 2rem;
}

.pharmacy-hours {
    background-color: #c5e2b2;
    padding: 1.5rem;
    border-radius: 8px;
    display: block;
}

.pharmacy-footer {
    background-color: #234e2e;
    color: white;
    padding: 2rem 0;
}

/* Header contact info styling */
.header-contact-info {
    background-color: #f8f9fa;
    padding: 1rem;
    margin: 1rem 0;
    border-radius: 5px;
    font-size: 0.9em;
}

.header-contact-info .contact-item {
    margin-bottom: 0.5rem;
}

.header-contact-info .contact-item:last-child {
    margin-bottom: 0;
}

.header-contact-info a {
    color: #007bff;
    text-decoration: none;
}

.header-contact-info a:hover {
    text-decoration: underline;
}

/* Services styling */
.service-item .features {
    list-style: none;
    padding: 0;
}

.service-item .features li {
    padding: 5px 0;
    border-bottom: 1px solid #eee;
}

.service-item .features li:before {
    content: "✓ ";
    color: #28a745;
    font-weight: bold;
}

/* Contact form styling */
.contact-form label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

.contact-form input,
.contact-form select,
.contact-form textarea {
    width: 100%;
    padding: 10px;
    margin-bottom: 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.contact-form input[type="checkbox"] {
    width: auto;
    margin-right: 8px;
}

/* Privacy and cookie policy content */
.privacy-content h3,
.cookie-content h3 {
    color: #007bff;
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.privacy-content h4,
.cookie-content h4 {
    color: #28a745;
    margin-top: 1.5rem;
    margin-bottom: 0.8rem;
}

/* Alert boxes */
.alert {
    padding: 15px;
    margin-bottom: 20px;
    border: 1px solid transparent;
    border-radius: 4px;
}

.alert h4 {
    margin-top: 0;
    color: inherit;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .pharmacy-services .row {
        display: block;
    }
    
    .pharmacy-services .col-4 {
        margin-bottom: 1rem;
    }
    
    .header-contact-info {
        font-size: 0.8em;
    }
    
    .header-contact-info .contact-item {
        margin-bottom: 0.3rem;
    }
    
    .service-item {
        margin-bottom: 2rem;
    }
}

/* Accessibility improvements */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

#acf_filed_image .acf-image-uploader .image-wrap img{
    max-height: inherit;
    height: inherit;
    height: 50px !important;
    max-width: inherit;
    width: inherit;
    height: 50px !important;
}

.site_link .logo{
    min-width: 232px;
    width: 470px;
    max-width: 30vw;
}

/* =====================================
  BASE RESET
===================================== */
body.modal-open {
    overflow: hidden;
}

/* =====================================
   MODAL
===================================== */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1050;
    display: none;
    width: 100%;
    height: 100%;
    overflow-x: hidden;
    overflow-y: auto;
    outline: 0;
}

.modal.show {
    display: block;
}

.modal-dialog {
    position: relative;
    margin: 50% auto;
    max-width: 600px;
    width: calc(100% - 2rem);
}

.modal-content {
    position: relative;
    display: flex;
    flex-direction: column;
    background-color: #fff; /* sfondo bianco */
    border-radius: 0.5rem;
    outline: 0;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.modal-header,
.modal-body,
.modal-footer {
    padding: 1rem;
}

.modal-header {
    border-bottom: 1px solid #dee2e6;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-footer {
    border-top: 1px solid #dee2e6;
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
}

.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1040;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.6);
    opacity: 0;
    transition: opacity 0.15s ease-in-out;
}

.modal-backdrop.show {
    opacity: 1;
}

/* =====================================
   MODAL CLOSE BUTTON
===================================== */
.btn-close {
    width: 1.5rem;
    height: 1.5rem;
    background-color: #dc3545;
    border: none;
    border-radius: 50%;
    position: relative;
    cursor: pointer;
    flex-shrink: 0;
}

.btn-close::before,
.btn-close::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0.8rem;
    height: 2px;
    background-color: #fff;
    transform-origin: center;
}

.btn-close::before {
    transform: translate(-50%, -50%) rotate(45deg);
}

.btn-close::after {
    transform: translate(-50%, -50%) rotate(-45deg);
}

/* =====================================
   BUTTONS
===================================== */
button,
.btn {
    display: inline-block;
    padding: 0.5rem 1rem;
    font-size: 1rem;
    font-weight: 500;
    border-radius: 0.375rem;
    cursor: pointer;
    transition: background-color 0.15s ease-in-out;
}

button:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

/* =====================================
   ACCORDION / COLLAPSE
===================================== */
.collapse {
    display: none;
    overflow: hidden;
    transition: height 0.2s ease;
}

.collapse.show {
    display: block;
}

.collapsing {
    height: 0;
    overflow: hidden;
    transition: height 0.2s ease;
}

.accordion-header {
    cursor: pointer;
    background: #f8f9fa;
    padding: 0.75rem 1rem;
    border: 1px solid #dee2e6;
    border-radius: 0.375rem;
    margin-bottom: 0.25rem;
    font-weight: 500;
    transition: background 0.15s;
}

.accordion-header:hover {
    background: #e9ecef;
}

.accordion-body {
    padding: 0.75rem 1rem;
    border: 1px solid #dee2e6;
    border-radius: 0.375rem;
    margin-bottom: 0.5rem;
    background: #fff;
}

/* =====================================
   CHECKBOX
===================================== */
#s-bl .b-bn {
    margin-top: 0;
    background: #94c990 !important;
    padding: 5px;
    border: 1px solid #ccc;
    border-radius: 5px;
    margin: 5px 0;
}

.d-none{
    display: none !important;
}
.w-100 {
    width: 100% !important;
}

.on-i{
    opacity: 0;
}

/* Contenitore principale */
.b-tg.form-check {
    position: absolute;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    user-select: none;
    right: 25px;
}

/* Nasconde l'etichetta testuale se non serve */
.t-lb.d-none {
    display: none;
}

/* Nasconde l'input nativo ma mantiene l'accessibilità */
.c-tgl {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

/* Wrapper visuale dello switch */
.c-tg {
    position: relative;
    display: inline-block;
    width: 3.2rem;
    height: 1.8rem;
    background-color: #dee2e6;
    border-radius: 1rem;
    transition: background-color 0.25s ease, box-shadow 0.25s ease;
    box-shadow: inset 0 0 0 1px #ced4da;
}

/* Cerchio interno (manopola) */
.c-tg .on-i,
.c-tg .off-i {
    position: absolute;
    top: 0.15rem;
    left: 0.15rem;
    width: 1.5rem;
    height: 1.5rem;
    border-radius: 50%;
    background: #fff;
    transition: transform 0.25s ease, background-color 0.25s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

/* Stato "off" */
.c-tg .off-i {
    transform: translateX(0);
}

/* Stato "on" */
.c-tgl:checked + .c-tg .off-i {
    transform: translateX(1.4rem);
    background-color: #fff;
}

/* Sfondo quando attivo */
.c-tgl:checked + .c-tg {
    background-color: #0d6efd; /* colore Bootstrap primary */
    box-shadow: inset 0 0 0 1px #0d6efd;
}

/* Hover */
/*.b-tg:hover .c-tg {*/
/*    box-shadow: inset 0 0 0 1px #aaaaaa, 0 0 0 4px rgba(13, 110, 253, 0.15);*/
/*}*/

/* Stato disabilitato */
.c-tgl:disabled + .c-tg {
    cursor: not-allowed;
    background-color: #e9ecef;
    box-shadow: none;
}

/* Variante rossa, se hai class="c-ro" */
.c-tg.c-ro {
    background-color: #f8d7da;
    box-shadow: inset 0 0 0 1px #f5c2c7;
}

.c-tgl:checked + .c-tg.c-ro {
    background-color: #aaa; /* Bootstrap danger */
    box-shadow: inset 0 0 0 1px #aaa;
}

#btn-cookies{
    width: 50px;
    height: 50px;
    background: #94c990;
    z-index: 9999;
    position: fixed;
    cursor: pointer;
    bottom: 20px;
    right: 20px;
}

.desc.b-acc {
    border: 1px solid #94c990;
    background: #edf9ec;
    border-radius: 5px;
}

#s-bl tr{
    border-top: 1px solid #94c990;
}

.btn.btn-primary {
    background: #94c990;
    border: none;
}
.btn.btn-primary:hover {
    background: #82b57f;
}
.btn.btn-secondary {
    background: #6c757d;
    border: none;
}
.btn.btn-secondary:hover {
    background: #5a6268;
}

/*PRODUCTS*/

.product-wrapper,
.product-image{
    position: relative;
}

.product-item {
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid #d7d7d7;
    background: #fff;
    padding-bottom: 1em;
}

.sale-badge {
    position: absolute;
    color: #fff;
    font-weight: 700;
    background-color: #3f8937;
    border-radius: 20px;
    font-size: .7em;
    line-height: 1em;
    padding: 3px 5px;
    top: 10px;
    right: 10px;
}

.price-badge {
    position: absolute;
    color: #fff;
    bottom: 10px;
    right: 10px;
    font-weight: 700;
}

.price-badge .old-price{
    color: #6c757d;
    text-decoration: line-through;
    font-weight: 700;
    background-color: #f1f1f1;
    border-radius: 20px;
    font-size: .7em;
    line-height: 1em;
    padding: 3px 5px;
    border: 1px solid #ccc;
}

.price-badge .price,
.price-badge .sale-price{
    color: #3f8937;
    font-weight: 700;
    background-color: #fff;
    border-radius: 20px;
    font-size: .7em;
    line-height: 1em;
    padding: 3px 5px;
    border: 1px solid #3f8937;
}


.product-item img{
}
.product-item h3 {
    font-size: 1.2rem;
    margin: 0.5rem 0;
}

.product-item header,
.product-item p,
.product-item footer{
    margin: 0;
    padding: 0 0.5rem;
}

.product-item p{
    font-size: .9em;
    font-weight: 400;
    line-height: 1.6em;
    height: 6em; /* Altezza fissa per 3 righe di testo */
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 3; /* Limita a 3 righe */
    -webkit-box-orient: vertical;
}

.wpml-ls-native{
    line-height: 1.2em;
}